note 5086 deleted from function.setcookie by sniper

From: Date: Wed, 11 Dec 2002 07:15:08 +0000
Subject: note 5086 deleted from function.setcookie by sniper
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40719@lists.php.net to get a copy of this message
I use cookies with setcookie and they work with IE4,4.5 (mac) and 5...., but you may use an alternative function to set cookie <pre> function mySetCookie($name,$data,$exp) { $c=sprintf("<META HTTP-EQUIV=\"Set-Cookie\" CONTENT=\"%s=%s",$name,$data); if($exp>0) { // the 'y' must be lowercase if the browser don't work with full year, but then maybe will be problems with Y2k $d=date("l, d-M-Y H:i:s CST",$exp); $c.=";$d"; } $c.="\">\n"; echo $c; } </pre>

« previous php.notes (#40719) next »