Re: IE cookies don't expire!

From: Date: Tue, 10 Jul 2001 11:23:58 +0000
Subject: Re: IE cookies don't expire!
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-57132@lists.php.net to get a copy of this message
define a variable to be set on refresh along with the URL that erases the cookie by setting it's expire to time() minus a month or so. If you don't want the url varibale passer to show then have it set the cookie then to a header redirect to $PHP_SELF. <?php if ($refresh) { setcookie('cookiename', '',(time()-259200000),'/',$HTTP_HOST,0); } if ($refresh) { header("location:" . $PHP_SELF); exit; } ?> use that in the beginning of your page and be sure to add a ?refresh= to your refreshing url. hope this helps with what i know about the subject.

« previous php.general (#57132) next »