Re: Vars passed via URL disappearing

From: Date: Fri, 02 Aug 2002 19:45:41 +0000
Subject: Re: Vars passed via URL disappearing
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-110871@lists.php.net to get a copy of this message
At 3:29 PM -0400 8/2/02, Monty wrote:
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?
'variables passed via the URL' = 'GET variables' -steve -- +------------------------------------------------------------------------+ | Steve Edberg sbedberg@ucdavis.edu | | University of California, Davis (530)754-9127 | | Programming/Database/SysAdmin http://pgfsun.ucdavis.edu/ | +------------------------------------------------------------------------+ | The end to politics as usual: | | The Monster Raving Loony Party (http://www.omrlp.com/) | +------------------------------------------------------------------------+

« previous php.general (#110871) next »