From: "Brian Dunning" <[EMAIL PROTECTED]>

> How do I check for the presence of an optional $_GET param without 
> throwing a "Notice: Undefined index" when the param is not present?
> 
> Tried all three of these, they all produce the Notice when the param is 
> not passed:
> 
> if ($_GET['id'])
> if ($_GET['id'] != "")
> if (isset $_GET['id'])

if(isset($_GET['id']))

or

if(!empty($_GET['id']))

depending upon what you want to do.

---John Holmes...

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

Reply via email to