This is simple. I set the cookies, storing their username and password.
Code:
setcookie('userid', $userid, strtotime(date('Y-m-d H:i:s')) + (86400 * 30), '/', getenv('HTTP_HOST'));
setcookie('userpassword', $userpassword, strtotime(date('Y-m-d H:i:s')) + (86400 * 30), '/', getenv('HTTP_HOST'));
Now, to delete these cookies, I would just do
Code:
setcookie('userid', '', strtotime(date('Y-m-d H:i:s')) - (86400 * 30), '/', getenv('HTTP_HOST'));
setcookie('userpassword', ''strtotime(date('Y-m-d H:i:s')) -(86400 * 30), '/', getenv('HTTP_HOST'));
Correct?
It seems that I've tried a million different things and the cookie will never die.
Also, I have sessions on the page, so will that have any effect on the cookie being deleted?
Arg. Help. :\