Re: Destroying cookies... not working
| From: | Geoff Lane | Date: | Thu, 28 Apr 2011 08:07:44 +0000 |
| Subject: | Re: Destroying cookies... not working | ||
| References: | 1 2 3 4 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-312534@lists.php.net to get a copy of this message | ||
On Thursday, April 28, 2011, Sean Greenslade wrote:
> On Wed, Apr 27, 2011 at 8:52 PM, Rick Dwyer <rpdwyer@earthlink.net>
> wrote:
>> The following did the trick... is there any reason I should not use it?
>>
>> $name="mysession";
>> setcookie($name);
>>
>> --Rick
> Only if you're OCD, since the cookie is still technically there, just empty.
> Without setting the expire arg, the browser will keep it until closed.
What happens if you then use isset($_COOKIE['mysession'])? TBH, I
don't know and don't have the time to experiment just now. However,
this should return false if the cookie has been destroyed but if just
set to null or an empty string via Rick's code I suspect it'd return
true.
--
Geoff