Page 1 of 1

[SOLVED] Unset cookies

Posted: Wed Jul 28, 2004 6:44 am
by Cypher87
Somehow I cant seem to unset cookies. I tried:

Code: Select all

if($_COOKIE["rsoftnaam"]) { unset($_COOKIE["rsoftnaam"]); }
if($_COOKIE["rsoftpass"]) { unset($_COOKIE["rsoftpass"]); }
and:

Code: Select all

if($_COOKIE["rsoftnaam"]) { setcookie("rsoftnaam",$_COOKIE["rsoftnaam"],time()-85000); }
if($_COOKIE["rsoftpass"]) { setcookie("rsoftpass",$_COOKIE["rsoftpass"],time()-85000); }
I even tried both, but it doesnt work... can someone tell me whats wrong (I know its not the if() part cause I tried without it)

Posted: Wed Jul 28, 2004 6:48 am
by feyd
setcookie('name','',time() - 7 * 7 * 24 * 60 * 60);

make sure that you set the path and domain exactly the same too.

Posted: Wed Jul 28, 2004 7:13 am
by Cypher87
It works now

thnx :D