Re: Global Interference

From: Date: Thu, 08 May 2003 23:12:52 +0000
Subject: Re: Global Interference
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146942@lists.php.net to get a copy of this message
on 09/05/03 3:54 AM, caspar kennerdale (caspar@thetuckshop.com) wrote: > I have a form posting values from its text fields to a switch constructor. > it posts to > > $_SERVER['PHP_SELF']."?action=Test > > In the switch 'Test' I want to echo the variable I have posted. > > I assumed I would print them out such as this- > > echo $GLOBALS['Font']; // Font being the name of the variable If you want to echo a value of a form element that you POSTed to the current script, and you have register globals off, then you need to call it as $_POST['postedVarName']. FWIW, you would find the URL var "Test" in $_GET['Test']. I have code which is completely register globals off, and I don't use the $GLOBALS array very often at all, if ever. Justin

« previous php.general (#146942) next »