visitor (0 QPoints)
  • FR
  • EN
  • NL
  • DE
  • ES
294 experts, 1172 registered users, 1625 questions already answered
European Experts Exchange, the very best site for high-quality IT solutions

New Improved Search!

 


The DDRK link is back online.
We got a one week service interruption, sorry.
(23-30/01/2010)

Web :: General :: how to unset a cookie ? in PHP, unset($_COOKIE['somename']) ?


By: PHP newbee U.S.A.  Date: 17/05/2006 09:58:59  English  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 English  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 English  Type : Comment
Note that this may be linked to this new KB entry

Do register to be able to answer

 Add This Article To:
 del.icio.usDel.icio.us  diggDigg  googleGoogle  spurlSpurl
 blinkBlink  wongWong  simpySimpy  yahooY! MyWeb 
EContact
browser fav
page generated in 58.856010 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page