note 4066 modified in setcookie by jmoore
| From: | jmoore@php.net | Date: | Sun, 17 Dec 2000 21:53:41 +0000 |
| Subject: | note 4066 modified in setcookie by jmoore | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-8814@lists.php.net to get a copy of this message | ||
When using setcookie() IE 5 sometimes give some problems try this instead:
<PRE>$time = mktime()+600;
$date = date("l, d-M-y H:i:s", ($time));
header("Set-Cookie: cookiename=$value; expires=$date GMT");</PRE>
In this example the cooky will expire in ten minutes, good luck with it.
PS: You better use this because it works always.
Dennis van der Vliet
http://www.php.net/manual/function.setcookie.php