note 34972 added to function.setcookie
| From: | joe at rack1 dot php dot net | Date: | Wed, 13 Aug 2003 20:04:19 +0000 |
| Subject: | note 34972 added to function.setcookie | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-54105@lists.php.net to get a copy of this message | ||
I don't anyone has said this yet, so it may be a repeat. Anyhow, while making a membership
script for my website I came across a strange problem with deleting my cookies. If I just used
"setcookie('name','value',time()-3600)" as it said to above, nothing
would happen - the cookie would still exist! So, after the "setcookie()" statement I added
"unset($_COOKIE['name'];)" and it worked perfectly!
I hope that this tip will help someone who is having the same problem. Oh yeah, I don't know if
it really matters, but I am using PHP 4.3.1 with "register_globals" set to
"off".
God bless!
Joe of 4Life
(4life.ath.cx)
----
Manual Page -- http://www.php.net/manual/en/function.setcookie.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+34972
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+34972&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+34972&report=yes