Re: grabbing variables from the query string

From: Date: Sat, 28 Apr 2001 17:15:00 +0000
Subject: Re: grabbing variables from the query string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-50766@lists.php.net to get a copy of this message
if register_globals setting is on (in php.ini) then $foo will be available, otherwise use the predefined variable HTTP_GET_VARS : index.php?foo=blah print $foo; print $HTTP_GET_VARS['foo']; http://www.php.net/manual/en/language.variables.predefined.php http://www.php.net/manual/en/configuration.php#ini.register-globals btw, you'll note predefined variable QUERY_STRING exists in there too :-) regards, philip On Sat, 28 Apr 2001, Jamie Saunders wrote: > Hi, > > How do you grab variables from a query string in a URL? > I've used this with ASP and it would be done as follows: > > firstName = request.querystring("fName") > > I've tried different variations of this in my PHP pages but I can't seem to > get it to work. I've looked in the PHP manual but can't find any > information relating to the query string. > > Thanks. > > Jamie Saunders > Mail: webprogramming@jamie-s.co.uk > Web: http://jamie-s.co.uk > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#50766) next »