note 5095 deleted from setcookie by jmoore

From: Date: Sun, 17 Dec 2000 21:55:18 +0000
Subject: note 5095 deleted from setcookie by jmoore
Groups: php.notes 
Request: Send a blank email to php-notes+get-8816@lists.php.net to get a copy of this message
Thanks to dennis@wacky.nu! The code he gave above, <pre>$time = mktime()+600; $date = date("l, d-M-y H:i:s", ($time)); header("Set-Cookie: cookiename=$value; expires=$date GMT");</pre> Can aswell be used with the regular SetCookie for libs that use it: <pre>$time = mktime()+600; $date = date("l, d-M-y H:i:s", ($time)); setcookie("TestCookie","Test Value","$date GMT","/","www.yourdomain.com","");</pre> And works perfectly with all tested browsers including IE4, 5, 5.5. /More

« previous php.notes (#8816) next »