Re: HTTP request parameters do not populate variables

From: Date: Sun, 01 Feb 2004 15:30:51 +0000
Subject: Re: HTTP request parameters do not populate variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-176503@lists.php.net to get a copy of this message
Slava Zinkovski wrote:
[snip...] I run it with URL like this http://localhost/myApp/test.php?param=qqq: I expect it to print 'param=qqq' string, though it does not! :((( Here is the output:
    Array ( [param] => qqq )
    Notice: Undefined variable: param in d:\phptest\test.php on line 4
    param =
Though, the script produces expected output when uploaded to a production server. Where is the bug? Any ideas are greatly appreciated.
No bug. You cannot directly get the value for $param because you have 'register_globals' set off while this is good for security. Now you can get the value for 'param' by either $_REQUEST["param"] or $_GET["param"]. Hope this helps. Best Bao

« previous php.general (#176503) next »