ID: 24276 Updated by: [EMAIL PROTECTED] Reported By: joemiggs82 at yahoo dot com Status: Bogus Bug Type: Session related Operating System: Solaris 8 & 9 PHP Version: 4.3.2 New Comment:
In PHP 4.2.0, the 'register_globals' setting default changed to 'off'. See http://www.php.net/release_4_2_0.php for more info. We are sorry about the inconvenience, but this change was a necessary part of our efforts to make PHP scripting more secure and portable. $_POST or $_GET or $_REQUEST... Previous Comments: ------------------------------------------------------------------------ [2003-06-21 04:59:34] [EMAIL PROTECTED] Register_globals = off makes PHP *not* register globals, so they don't end up in $GLOBALS, use $_GET or $_POST to access them ddepending on your HTTP Request Method. ------------------------------------------------------------------------ [2003-06-21 04:55:51] joemiggs82 at yahoo dot com Description: ------------ Assuming register_globals is turned off in the php.ini file, the $GLOBALS variable array will then be used in accessing variables defined in the script. In our case, this doesn't seem to work. Reproduce code: --------------- <html> <body> <a href="thisfile.php?nav=MORE">Click me for more!</a> <? if($GLOBALS["nav"]=="MORE") { echo "You just clicked for more!"; } else { ?> <? } ?> </body> </html> Expected result: ---------------- Before: Click me for more! After clicking: Click me for more! You just clicked for more! Actual result: -------------- Before: Click me for more! After clicking: Click me for more! ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=24276&edit=1