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

New Improved Search!

 


05/10/2011 1h30 : Steve Jobs is dead, the father of Apple ][ is gone, we are all orphaned.

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

EContact
browser fav
page generated in 94.911810 milliseconds

Why Google AdSense ads ?

compteur
 Ranking-Hits PageRank for this page