unsetting cookies


#1

i have a script that attempts to unset cookies by doing the following:

[php]<?php

setcookie( “login”, “”, time()-60 );
setcookie( “id”, “”, time()-60 );
setcookie( “username”, “”, time()-60 );
setcookie( “privs”, “”, time()-60 );

?>
[/php]

however, the cookies don’t get unset. :evil:


#2

Have you tried it without the time() function?

[php]

<?php setcookie("login", ""); setcookie("id", ""); setcookie("username", ""); setcookie("privs", ""); ?>

[/php]


#3

haven’t. but i’ll try now.

nope didn’t make a single bit of difference. :(


#4

Can’t you use unset($_COOKIE[‘login’])?

(Usually use sessions personally)