Vars passed via URL disappearing
| From: | Monty | Date: | Fri, 02 Aug 2002 19:29:51 +0000 |
| Subject: | Vars passed via URL disappearing | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-110869@lists.php.net to get a copy of this message | ||
I just upgraded to PHP 4.2.2 and am trying to make my sites work with
register_globals turned OFF. I notice, however, that with register_globals
turned off any variables I pass via the URL don't seem to be recognized by
the script it was passed to.
So, if I pass "http://my.site.com/page.php?id=2002", the
variable "id" is
empty when I try to access it in page.php ...
if (!empty($id)) { do stuff...}
else { echo "error"; }
With register_globals OFF, the above produces the error message. With
register_globals ON, it works fine.
I thought register_globals only affected session, cookie and get type
variables? Why is PHP ignoring the variables passed via the URL?
Thanks.
Monty