Faqts : Business : Programming : Shopping For You : PHP : Common Problems : Cookies

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

44 of 107 people (41%) answered Yes
Recently 4 of 10 people (40%) answered Yes

Entry

How do I delete a cookie?

Jan 23rd, 2000 19:19
Nathan Wallace,


You can't delete a cookie as such.  Instead you just empty it and set it
to expire at some time in the past.  For example:

    // delete the userid cookie
    setcookie('userid', '', time()-48*3600, '/');