unsetting cookies

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:

Have you tried it without the time() function?

[php]

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

[/php]

haven’t. but i’ll try now.

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

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

(Usually use sessions personally)

Sponsor our Newsletter | Privacy Policy | Terms of Service