note 27169 deleted from function.setcookie by john

From: Date: Sat, 30 Nov 2002 16:45:13 +0000
Subject: note 27169 deleted from function.setcookie by john
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-40184@lists.php.net to get a copy of this message
Another way, to set cookie without SetCookie() function. <?php //Time in seconds - cookie long. $howlong=3600*24*31; //Name of the cookie. $cookiename="name"; //Value of the cookie. $cookievalue="value"; $cookieexpires=date("l, d-M-Y H:i:s",time()+$howlong); header("Set-Cookie: {$cookiename}={$cookievalue}; expires={$cookieexpires} GMT; path=/;"); ?> Greetings from Russia.

« previous php.notes (#40184) next »