Jens Winberg wrote:
> I'm having trouble with the newest version of PHP (4.2.2).
> For example in a page I'm using the following code:
> if ($_GET['action'] == "logout") {
>    //do something
> }
>
> But I'm getting an error message that says:
> ...log_message reports: PHP Notice:  Undefined index:  action in....
>
> Ealier (other versions of PHP) I have succesfully used the above
> code, but do I now have to rewrite the code like this:
> if (isset($_GET['action']) AND $_GET['action'] == "logout") {
>    //do something
> }
>
> Or am I totally wrong?
> This was just one example when I'm getting the message "Undefined
> index" or " Undefined variable" etc. A lot of code which has
> previously worked is now giving me loads of headache since I have to
> rewrite everything.

Heh, that can be solved by setting the error_reporting in the php.ini to
"E_ALL & ~E_NOTICE"
They can also be disabled by putting the line error_reporting( E_ALL &
~E_NOTICE ) at the first (second, after the <?php) line in your code.

HTH Erwin



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to