CodeIgniter Forums
How to remove a cookie? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forum-21.html)
+--- Thread: How to remove a cookie? (/thread-42386.html)



How to remove a cookie? - El Forum - 06-06-2011

[eluser]ShoeLace1291[/eluser]
I've read the section on the input class in the user guide. Maybe I'm just missing it. How do I remove cookie data?


How to remove a cookie? - El Forum - 06-06-2011

[eluser]eoinmcg[/eluser]
http://ellislab.com/codeigniter/user-guide/libraries/input.html

scroll down to $this->input->set_cookie()

and you'll see this
Quote:To delete a cookie set it with the expiration blank.



How to remove a cookie? - El Forum - 06-08-2011

[eluser]DuncanCox[/eluser]
hey I tried this code but it did not work. Is there any other method to delete cookie?


How to remove a cookie? - El Forum - 06-08-2011

[eluser]eoinmcg[/eluser]
have your tried using the delete_cookie() function in the cookie helper?


How to remove a cookie? - El Forum - 06-08-2011

[eluser]InsiteFX[/eluser]
Subtract the time from the time you set!

InsiteFX