Re: Destroying cookies... not working

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, April 28, 2011, Sean Greenslade wrote:

> On Wed, Apr 27, 2011 at 8:52 PM, Rick Dwyer <rpdwyer@xxxxxxxxxxxxx>
> 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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux