It's not backwards compatible. If your code simply mentioned the variable name and not the method array, it will not work (as you noticed) when registerglobals is turned off ( for security reasons).
However, there are many ways of making your old code work, the easiest is probably to extract the $_POST or $_GET array. Look in the manual at the array functions ( extract() ) and also read up on working with registerglobals = off. On Wed, 2003-05-28 at 11:49, [EMAIL PROTECTED] wrote: > Thank you mate, this works! =) > > Just curious, though... I'd like to keep my scripts as compatible as > possible, so can you tell me if this method is backwards compatible? I've > never used this method before, the variables have just "been there" on a > subsequent page. I'm kinda fearing for my previous work, if the servers > suddenly change their configurations, rendering scripts non-functional... > > And, I'm guessing $_POST would be the array to hold POSTed variables, right? > > Is there a function to "release" the contents of these arrays into global > variables in a scripts, so you don't have to go... > $var1 = $_GET[var1]; > $var2 = $_GET[var2]; > ...if that's what you wanted? (Not sure I want to, but just to know) > > Again, thank you! =) > > Daniel > > > ----- Original Message ----- > From: Petre Agenbag > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Sent: Wednesday, May 28, 2003 11:40 AM > Subject: Re: [PHP] Variables don't pass... *sniff* > > > RegisterGlobals = Off > > You need to access these variables by > > $_POST[aVariable] or in your case ( adding the variables to the end of a > URL means you are using the GET method: $_GET[aVAriable] etc. > > On Wed, 2003-05-28 at 11:37, [EMAIL PROTECTED] wrote: > > Hi all! > > > > I'm using Apache 2.0.45, PHP 4.3.2RC4, and MySQL 3.23.49 on Windows 2003 > > Server Standard. > > > > I have a problem passing variables between pages. They simply get lost. > > Neither GET nor POST pass values, and even "hardcoding" them into the URL, > > like > > > > htpp://localhost/comeon.php?aVariable=ding&anotherVariable=dong > > > > and putting this in comeon.php: > > > > echo("Values: $aVariable, $anotherVariable"); > > > > only outputs > > > > Values: , > > > > ...I've tried with RC3 of PHP, even 4.3.1, but it doesn't work. I've used > > PHP on my machine with Apache 2 before, and it worked fine. Actually I > used > > the same scripts fine on my old config. This was on XP however, so I'm not > > sure if it's got something to do with the OS. I'm hoping it's a > > configuration issue. > > > > Any ideas are VERY much appreciated =). > > > > Thanks, > > Daniel > > > > > > » There are 10 kinds of people - those who know binary and those who > don't. > > « > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php