[eluser]Samutz[/eluser]
I'm having this same problem.
Code:
function login ()
{
// database stuff here blah blah blah
set_cookie(array(
'name' => 'user',
'value' => $row->id, //from db
'expire' => '86400' //24 hours
));
set_cookie(array(
'name' => 'hash',
'value' => $this->_userhash($row->id), //function that makes a custom hash for this user
'expire' => '86400'
));
// checked firefox cookies at this point and there's no problem
}
function logout ()
{
delete_cookie('user');
delete_cookie('hash');
// should delete cookies, but doesn't
// firefox reports that they're still set with expiration in 24 hours
print_r($_COOKIE); //also shows that they're still set
}
Edit: Got it to work using this:
Code:
set_cookie(array(
'name' => 'user',
'value' => null,
'expire' => null
));
set_cookie(array(
'name' => 'hash',
'value' => null,
'expire' => null
));