Pi_Mastuh Posted January 22, 2007 Share Posted January 22, 2007 I'm using a code that when you go to my site it re-directs to another page, home.php, if it finds cookies. Otherwise is creates them when you login. I've got it to find the cookies and re-direct but when I hit logout it just re-directs back to home.php, which means the user is logged in forever. I can't get them to delete. Any ideas? Link to comment https://forums.phpfreaks.com/topic/35214-deleting-cookies/ Share on other sites More sharing options...
Cep Posted January 22, 2007 Share Posted January 22, 2007 You can set the cookie to expire,[code=php:0]$time = time(); setcookie("myCookieName", "", $time - 3600);[/code] Link to comment https://forums.phpfreaks.com/topic/35214-deleting-cookies/#findComment-166286 Share on other sites More sharing options...
Pi_Mastuh Posted January 22, 2007 Author Share Posted January 22, 2007 I tried that and it didn't work. It still finds the cookie ??? Link to comment https://forums.phpfreaks.com/topic/35214-deleting-cookies/#findComment-166288 Share on other sites More sharing options...
Cep Posted January 22, 2007 Share Posted January 22, 2007 Please post your code you may have looped yourself somewhere in your process Link to comment https://forums.phpfreaks.com/topic/35214-deleting-cookies/#findComment-166289 Share on other sites More sharing options...
Pi_Mastuh Posted January 22, 2007 Author Share Posted January 22, 2007 Nevermind I got it working, I had a typo in the cookie name. Thank you :). Link to comment https://forums.phpfreaks.com/topic/35214-deleting-cookies/#findComment-166292 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.