Web :: General :: how to unset a cookie ? in PHP, unset($_COOKIE['somename']) ? |
|||
| By: PHP newbee |
Date: 17/05/2006 09:58:59 |
Points: 20 | Status: Answered Quality : Excellent |
|
I use $_COOKIE['somename'] in my PHP code, and now I want to unset the cookie. How do I do that ? unset($_COOKIE['somename']) ? |
|||
| By: VGR | Date: 17/05/2006 10:51:47 | Type : Answer |
|
| No, I suggest rather this : $_COOKIE['somename']=array(); // deletes current global variable setcookie('somename','',time()); // deletes actual client's cookie |
|||
| By: VGR | Date: 17/07/2006 08:43:58 | Type : Comment |
|
| Note that this may be linked to this new KB entry | |||
|
Do register to be able to answer |
|||
©2010 These pages are served without commercial sponsorship. (No popup ads, etc...). Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE.
Please DO link to this page!








