Right, and if $_COOKIE['cookie'] isn't set, then it will still return the same results, right?
For example:
if (!$_COOKIE['firstvisit'] && !$_GET['cookie']) {
setcookie("firstvisit", time(), time()+3600);
header("Location: ".$PHP_SELF."?cookie=1");
exit;
}
if (!$_COOKIE['firstvisit'] && $_GET['cookie']) {
$cookieerror = "You aren't accepting cookies, or your browser doesn't support them.";
}
Is functionally the same as:
if (!isset($_COOKIE['firstvisit']) && !isset($_GET['cookie'])) {
setcookie("firstvisit", time(), time()+3600);
header("Location: ".$PHP_SELF."?cookie=1");
exit;
}
if (!isset($_COOKIE['firstvisit']) && isset($_GET['cookie'])) {
$cookieerror = "You aren't accepting cookies, or your browser doesn't support them.";
}
After all, if the browser isn't accepting or doesn't support cookies, then if (!$COOKIE['cookie']) would return the same that if (!isset($COOKIE['cookie'])) would. Right? I really am asking. It seems the same to me.