dink87522 Posted August 22, 2009 Share Posted August 22, 2009 How do I delete a cookie. I have setcookie("questionCount", time() -3600); and are trying to delete the cookie questionCount although it doesn't work. Link to comment https://forums.phpfreaks.com/topic/171449-delete-cookie/ Share on other sites More sharing options...
dink87522 Posted August 22, 2009 Author Share Posted August 22, 2009 It works in IE, but not Firefox??? Link to comment https://forums.phpfreaks.com/topic/171449-delete-cookie/#findComment-904136 Share on other sites More sharing options...
bundyxc Posted August 22, 2009 Share Posted August 22, 2009 Sounds like it's a browser issue.. and by that, I think it's YOUR browser issue. Try resetting Firefox to default settings, and give it a second shot. Link to comment https://forums.phpfreaks.com/topic/171449-delete-cookie/#findComment-904171 Share on other sites More sharing options...
PFMaBiSmAd Posted August 23, 2009 Share Posted August 23, 2009 You are not putting the correct parameters into the setcookie() function. The second parameter is the value (you are trying to put a time into it) and the third parameter is the expire time. Link to comment https://forums.phpfreaks.com/topic/171449-delete-cookie/#findComment-904194 Share on other sites More sharing options...
bundyxc Posted September 4, 2009 Share Posted September 4, 2009 So it would be something like this: setcookie('questionCount', '', time() - 3600); //By the way, is there any reason not to just do this: setcookie('cookieName', '', 0); //Zero in unix time is about forty years ago. Any reason not to do this? Link to comment https://forums.phpfreaks.com/topic/171449-delete-cookie/#findComment-912213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.