Re: giving variable value in URL problem
| From: | Burhan Khalid | Date: | Sun, 16 Nov 2003 22:26:52 +0000 |
| Subject: | Re: giving variable value in URL problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169856@lists.php.net to get a copy of this message | ||
Chris Shiflett wrote:
--- Burak Delice <bdelice@yahoo.com> wrote:Firstly, !$_GET['status'] means "if status is not equal to or greater than zero" -- which of course will not work. Also, this will not work because 0 is considered false in PHP. So if status is 0, then it won't echo anything (nevermind the syntax error). Try $status = isset($_GET['status']) ? $_GET['status'] : NULL; echo $status; -- Burhan Khalid phplist[at]meidomus[dot]com http://www.meidomus.com ----------------------- "Documentation is like sex: when it is good, it is very, very good; and when it is bad, it is better than nothing."http://localhost/menu.php?status=0 php return[snip]if ($status==0) echo '"trying";if (!$_GET['status']) {echo '"trying";}