Re: Destroying cookies... not working
| From: | Andre Polykanine | Date: | Wed, 27 Apr 2011 23:22:05 +0000 |
| Subject: | Re: Destroying cookies... not working | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312516@lists.php.net to get a copy of this message | ||
Hello Rick,
Pay attention how you did set the cookie.
When I tried to unset the cookie using only three parameters, I got no
luck because I had set it using five:
setCookie ("mycookie", "", time()-32557600, '/',
'.oire.org');
--
With best regards from Ukraine,
Andre
Skype: Francophile
My blog: http://oire.org/menelion (mostly in Russian)
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
------------ Original message ------------
From: Rick Dwyer <rpdwyer@earthlink.net>
To: php-general@lists.php.net
Date created: , 2:16:43 AM
Subject: [PHP] Destroying cookies... not working
Hello all.
I have a logout page that should be destroying cookies when loaded...
but it is not.
setcookie("mycookie", "False", time() - 3600, "/");
However, I can still pull values stored in the cookie and I can still
see the cookie in my browser's "Show Cookies" window.
So I tried the following:
setcookie('mycookie','',time()-3600);
unset($_COOKIE['mycookie']);
Still no luck.
Any help with this is appreciated.
--Rick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php