Page 1 of 1

$_COOKIE[''], $_GET[''], and $_POST['']

Posted: Thu Jan 25, 2007 2:30 pm
by user___
Hi guys,
I am creating a class in which I check a cookie whether it has a value or not. When I start the script(in which the class is invoked) and the cookie is not set yet I get a Notice
Undefined index:...
. Does anyone can help. It is the same with $_GET and $_POST.
This is the part which checks the Cookie:

Code: Select all

if($_COOKIE['myCookie']) {
}

Posted: Thu Jan 25, 2007 2:38 pm
by Burrito
have a look at isset()