It can't find cookies...? And how do I unset() them?
Posted: Fri Sep 23, 2005 2:44 pm
Dunno what I'm doing wrong. I've got a couple of cookies set:
And when I check for them, it doesn't find them:
is_logged() always returns false.
Yes, double-checked that the cookies are indeed set.
Edit: Another question... unset($_COOKIE['name']) refuses to work. How do I unset a cookie?? O.o
Code: Select all
setcookie('SKP_USER',$_POST['user'],time()+60*60*24*7); // 7 days
setcookie('SKP_PASS',md5($_POST['pass']),time()+60*60*24*7);Code: Select all
function is_logged() {
if (isset($_COOKIE['SKP_USER']) && isset($_COOKIE['SKP_PASS'])) {
$user = $_COOKIE['SKP_USER'];
$pass = $_COOKIE['SKP_PASS'];
return true;
}
return false;
} // truncatedYes, double-checked that the cookies are indeed set.
Edit: Another question... unset($_COOKIE['name']) refuses to work. How do I unset a cookie?? O.o