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 |
|||
| Add This Article To: | |||
| |
|
|
|
| |
|
|
|








