ID: 24276 Updated by: [EMAIL PROTECTED] -Summary: $GLOBALS array doesn't seem to work Reported By: joemiggs82 at yahoo dot com -Status: Open +Status: Bogus Bug Type: Session related -Operating System: windows 95/98 +Operating System: Solaris 8 & 9 -PHP Version: 4.3.1 +PHP Version: 4.3.2 New Comment:
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. Previous Comments: ------------------------------------------------------------------------ [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