RE: [PHP] Passing arguments to the same script

From: Date: Mon, 02 Dec 2002 04:12:04 +0000
Subject: RE: [PHP] Passing arguments to the same script
Groups: php.general 
Request: Send a blank email to php-general+get-126671@lists.php.net to get a copy of this message
I think you\'d want to use: if ( $_SERVER[\'QUERY_STRING\'] == \'samples\') { // code } otherwise if you use , set your links as: <a href=\"index.php?samples=1\"> -js On Sun, 1 Dec 2002 22:38:54 -0500 Holmes wrote: > > > > I\'m sure this is easy, but I\'m drawing a blank. I need to have links > at > > the > > bottom of the page that passes arguments to the same script (itself) > when > > it > > gets reloaded. How do we do this? > > > > I have the links like this now: > > > > <a href=\"index.php?samples\"> > > > > How do I determine what is passed? I need to do an \"if\" statement > with > > different outputs depending on the argument. > > > > if ($samples) { do something } > > if(isset($_GET[\'samples\'])) > { do something } > > ---John Holmes... > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > >

« previous php.general (#126671) next »