At 2:37 PM +0200 6/16/07, WeberSites LTD wrote:
I'm using this code to check if a cookie has a value :
If(!IsSet($HTTP_COOKIE_VARS["LoggedIn"])) ....
In case that this cookie is not set, how can i avoid the
Undefined index: line in the error log?
berber
berber:
Try this:
$loggedIn = isset($HTTP_COOKIE_VARS["LoggedIn"]) ?
($HTTP_COOKIE_VARS["LoggedIn"]) : "not logged in";
echo($loggedIn);
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php