RE: [PHP] Confused - $GLOBALS

From: Date: Fri, 10 Dec 2004 10:35:17 +0000
Subject: RE: [PHP] Confused - $GLOBALS
Groups: php.general 
Request: Send a blank email to php-general+get-203907@lists.php.net to get a copy of this message
To view the terms under which this email is distributed, please go to http://disclaimer.leedsmet.ac.uk/email.htm On 09 December 2004 20:41, Richard Lynch wrote: > My best guess from skimming your code is that you need: > > global $_POST; No, he doesn't. > > in the function that uses $_POST. > > Or is $_POST always global anyway? Yes. > > I always forget, because they changed it around on POST/GLOBALS/etc at > some point, but only on some of them. Grrr. The built-in arrays with names beginning $_ are "superglobals", i.e. always global anyway. The only other "superglobal" is $GLOBALS, which is a anming exception because it existed long before the $_ arrays came into existence. This has not changed at any point in the life of PHP -- the only change was the actual introduction of the $_ versions. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Headingley Campus, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#203907) next »