[thelist] $_GET undefined [was: Tips tricks and troubleshooting]

Eike Pierstorff eike.pierstorff at dynamique.de
Mon Feb 24 13:19:11 CST 2003

At 10:37 24.02.2003 -0800, you wrote:
> > if ($_GET['dubug'] ) { echo("this is line 21<br />");}
>I tried to do something like that:
>   if ($_GET['MenuID']) {echo "Yes";} else {echo "No";};
>and got an error:
>   Notice: Undefined index: MenuID in ...
>So I used array_key_exists().  But it works fine for my partner.
>Is there a switch or something?

Try  "if (isset($_GET['MenuID']) .....".  Worked for me, and I guess it's
better than supressing PHP notices.

-- eike

More information about the thelist mailing list