RE: [PHP] Passing arguments to the same script
| From: | Troy May | Date: | Mon, 02 Dec 2002 04:19:51 +0000 |
| Subject: | RE: [PHP] Passing arguments to the same script | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-126674@lists.php.net to get a copy of this message | ||
Thanks, I got it working by adding "=1"
-----Original Message-----
From: Chris Wesley [mailto:cwwesley@udlug.org]
Sent: Sunday, December 01, 2002 8:08 PM
To: 'PHP List'
Cc: Troy May
Subject: RE: [PHP] Passing arguments to the same script
On Sun, 1 Dec 2002, Troy May wrote:
> The only thing that EVER gets displayed is the final else. (Main content
> goes here.) What am I doing wrong? Once again, the links are in this
> format: <a href="index.php?samples">
<a href="index.php?samples=1">
To get the desired results with the code you posted, you have to give your
query string parameter(s) a value (as above). If you don't want to give
samples a value, then examine the query string as a whole:
$_SERVER[QUERY_STRING]
if( $_SERVER[QUERY_STRING] == "samples" ) ...
g.luck,
~Chris