RE: [PHP] Global Interference

From: Date: Thu, 08 May 2003 18:04:42 +0000
Subject: RE: [PHP] Global Interference
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146890@lists.php.net to get a copy of this message
it is off. i am in the process of converting and upgrading al of my code which relied on it being on. I thought $GLOBALS['Font'] would still let me access this and as I say when I printed $GLOBALS the value of the variable appeared -----Original Message----- From: Mike [mailto:php-digest@custom87.net] Sent: 08 May 2003 18:39 To: caspar kennerdale Subject: Re: [PHP] Global Interference Is register globals on or off? -Michael On Thu, 2003-05-08 at 08:54, caspar kennerdale 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 > > However I get the undefined index error message. > > I echo'ed my globals to see if it was there and there is a list of the > values posted in my form, so I assume that it is now a global variable and > it has a value- so why do I get this message and why can I not access the > variable? > > thanks once again

« previous php.general (#146890) next »