Re: HTTP request parameters do not populate variables

From: Date: Sun, 01 Feb 2004 15:28: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-176502@lists.php.net to get a copy of this message
And once again, someone didn't search the archives before posting like you are told to do on the mailing list page (this question is answered several times daily).. The bug is called register_globals being on on you production server and off onn you development server.. Learn not to use register globals.. Use $_GET['param'] instead... I'll quote myself: "The reason is the register_globals defaults to off last years or so, which it says in the FAQ and in the manual, as well as in the mailing list archives, which you must have ignored even though it's a notice saying 'Check the archives before posting a question, chances are it has already been asked and answered a few times.' This question has been answered just about a million times before.." -- // DvDmanDT MSN: dvdmandt¤hotmail.com Mail: dvdmandt¤telia.com "Slava Zinkovski" <zinkovski@sympatico.ca> skrev i meddelandet news:20040201143909.92676.qmail@pb1.pair.com... > Hi, everybody! > > I've just installed PHP on my workstation and it seems as I have some > trouble. The simplest code does not work! Here it is: > > <? > print_r($HTTP_GET_VARS); > print("param = " . $param); > ?> > > 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.

« previous php.general (#176502) next »