Pi_Mastuh Posted March 18, 2007 Share Posted March 18, 2007 I've been working with cookies and have made errors in setting them causing them to make weird things happen on my site. Is there a way that for a user going to a page, it deletes every cookie set for the specific domain? Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/ Share on other sites More sharing options...
interpim Posted March 18, 2007 Share Posted March 18, 2007 reset the same cookie with empty strings. Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/#findComment-209748 Share on other sites More sharing options...
Pi_Mastuh Posted March 18, 2007 Author Share Posted March 18, 2007 I'm not talking about just 1 cookie, I want it to delete every single cookie created by my site. Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/#findComment-209749 Share on other sites More sharing options...
fert Posted March 18, 2007 Share Posted March 18, 2007 foreach($_COOKIE as $key=>$value) { setcookie($key,"",time()-3600); } Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/#findComment-209755 Share on other sites More sharing options...
Pi_Mastuh Posted March 18, 2007 Author Share Posted March 18, 2007 I just paste it exactly like that into the page? Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/#findComment-209758 Share on other sites More sharing options...
JasonLewis Posted March 18, 2007 Share Posted March 18, 2007 place it where you want the users to go when the cookies are deleted. but that deletes EVERY cookie. Link to comment https://forums.phpfreaks.com/topic/43193-quick-question-about-cookies/#findComment-209798 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.