note 19061 deleted from function.setcookie by sniper
| From: | sniper@php.net | Date: | Wed, 11 Dec 2002 07:18:39 +0000 |
| Subject: | note 19061 deleted from function.setcookie by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40736@lists.php.net to get a copy of this message | ||
A.Karthik
India
---------
This code snippet can be used to set cookie across all browsers.
if (ereg("MSIE", getenv("HTTP_USER_AGENT")))
{
$time=mktime()+900;
$date=date("l, d-M-y H:i:s", ($time));
setcookie("glblog","$val",$date,"/");
}
else
{
setcookie("glblog","$val",time()+900,"/");
}
Regards