Jump to content

[SOLVED] Deleting a Cookie


podja

Recommended Posts

Hi,

 

I have a login script which sets 2 cookies:

 

setcookie('username', "$user", time()+60*60*24*30, "/", ".ilkleysb.com", 0);
setcookie('password', "$pass", time()+60*60*24*30, "/", ".ilkleysb.com", 0);

 

I then have a logout script that is meant to delete the cookies:

setcookie('username','',1);
setcookie('password','',1); 

header("location:index.php");

 

The cookie doesnt seem to get deleted though.

 

Any help would be appreciated!

 

Thanks.

Link to comment
https://forums.phpfreaks.com/topic/84123-solved-deleting-a-cookie/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.