Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread Shawn McKenzie
APseudoUtopia wrote: > On Mon, Mar 22, 2010 at 5:13 PM, Peter van der Does > wrote: >> On Mon, 22 Mar 2010 16:58:33 -0400 >> APseudoUtopia wrote: >> >>> Hey list, >>> >>> I have a very odd problem which has been driving me crazy for two >>> days. I've been trying to debug my code and gave up. I f

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread APseudoUtopia
On Mon, Mar 22, 2010 at 5:13 PM, Peter van der Does wrote: > On Mon, 22 Mar 2010 16:58:33 -0400 > APseudoUtopia wrote: > >> Hey list, >> >> I have a very odd problem which has been driving me crazy for two >> days. I've been trying to debug my code and gave up. I finally coded a >> very simple re

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread Peter van der Does
On Mon, 22 Mar 2010 16:58:33 -0400 APseudoUtopia wrote: > Hey list, > > I have a very odd problem which has been driving me crazy for two > days. I've been trying to debug my code and gave up. I finally coded a > very simple representation of what the code does, and I get the same > problem. How

Re: [PHP] Global Var Disappearing After Function

2010-03-22 Thread Andrew Ballard
On Mon, Mar 22, 2010 at 4:58 PM, APseudoUtopia wrote: > Hey list, > > I have a very odd problem which has been driving me crazy for two > days. I've been trying to debug my code and gave up. I finally coded a > very simple representation of what the code does, and I get the same > problem. However

Re: [PHP] global var.

2003-03-31 Thread Jason Wong
On Tuesday 01 April 2003 11:59, Sebastian wrote: > Hmm, interesting.. i dunno why it doesn't work for me, here is a bit of the > code, $var isn't getting the output of $id, any ideas? Are you sure that $id contains what you think it contains? Also could you explain the reason why your code is lai

Re: [PHP] global var.

2003-03-31 Thread Sebastian
Hmm, interesting.. i dunno why it doesn't work for me, here is a bit of the code, $var isn't getting the output of $id, any ideas? $var = &$id; if( ! $forg = resizer_main("image","image_$var", blah, blah"); $org = getimagesize( "$root/$forg" ); $result = @mysql_query("INSERT INTO imag

Re: [PHP] global var.

2003-03-31 Thread Marcus Rasmussen
Putting an & sign in front of the $id in the first line should do the trick: $variable = &$id; A short example: $bar = 0; $foo = &$bar; $bar = 2; print $foo; //prints 2 __ Marcus Rasmussen [EMAIL PROTECTED] www.marcusr.dk

RE: [PHP] global var.

2003-03-31 Thread Jon Haworth
Hi Sebastian, > $variable = $id; > // some other stuff > @mysql_query here > $id = mysql_insert_id(); > > How do I get $id from insert_id() to pass to $variable > above? Hard to explain the situation i am in, but the > query has to be below $variable ::blink:: Perhaps something like: