Re: A Simple Question
| From: | Adam Alkins | Date: | Wed, 10 Jul 2002 05:19:27 +0000 |
| Subject: | Re: A Simple Question | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-20438@lists.php.net to get a copy of this message | ||
> 4. Be careful with the $_GET[] array that Tony mentions, it is only
> available on more recent versions of PHP, before that it was
$HTTP_GET_VARS
> and a lot of people had been using just plain $var1 or whatever, assuming
> that "register_globals" would always be ON in the php.ini file (which also
> changed in recent versions).
> 4. Be careful with the $_GET[] array that Tony mentions, it is only
> available on more recent versions of PHP, before that it was
$HTTP_GET_VARS
> and a lot of people had been using just plain $var1 or whatever, assuming
> that "register_globals" would always be ON in the php.ini file (which also
> changed in recent versions).
register_globals was turned off by default in the INI file in 4.2.0+ so I
would recommend against using them. Besides compatability issues, there are
security issues with it. Of course, to maintain backward compatability
(Superglobals are only supported in 4.1.0+) you might want to use the
$HTTP_POST_VARS, $HTTP_GET_VARS e.t.c. which are being phased out however.
Remember though, 4.1.0 was released on the 10th of Decemeber, so there's a
good chance many hosts have upgraded to that version or greater, but there
are always the late ones.
Good reading: http://www.php.net/manual/en/language.variables.predefined.php
--------------
Adam Alkins
http://www.rasadam.com
--------------