Re: giving variable value in URL problem
| From: | Lucian Cozma | Date: | Mon, 17 Nov 2003 07:46:43 +0000 |
| Subject: | Re: giving variable value in URL problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-169898@lists.php.net to get a copy of this message | ||
Try:
if (isset($_GET['status']) && $_GET['status'] ==0) {
echo "Trying";
}
The warning is triggered by the fact that you use a variable that was not
previously defined. Check it before use with isset.
If in php.ini the value error_reporting = E_ALL, it will output warnings.
If you want the warnings to dissapear, set in php.ini:
error_reporting = E_ALL & ~E_NOTICE
Lucian
"Burak Delice" <bdelice@yahoo.com> wrote in message
news:20031116013209.51850.qmail@pb1.pair.com...
> hi,
>
> when I enter url like that http://localhost/menu.php?status=0
> php return
an
> error below :
> "Warning: Undefined variable: status in
> D:\calismalar\cengiz_ozdelice\web\menu.php on line 41"
> my code on 41.line is :
> if ($status==0) echo '"trying";
>
> what is problem?
>
> thank you.