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? Quote Link to comment Share on other sites More sharing options...
interpim Posted March 18, 2007 Share Posted March 18, 2007 reset the same cookie with empty strings. Quote Link to comment 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. Quote Link to comment 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); } Quote Link to comment 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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.