Re: How to use multiple cookie statements

From: Date: Mon, 12 Jul 2004 20:10:48 +0000
Subject: Re: How to use multiple cookie statements
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-190282@lists.php.net to get a copy of this message
> <? > setcookie("cookie[name]","$_POST['name']", time()+86400) > setcookie ("cookie[email]","$_POST['email']", time()+86400) > setcookie ("cookie[bgcolor]","$_POST['bgcolor']", time()+86400) > setcookie ("cookie[tcolor]", "$_POST['tcolor']", time()+86400) > > ?> you could try this: setcookie ('values', serialize($_POST), time()+86400); then when you want to retrieve it use $values = unserialize($_COOKIE['values']);

« previous php.general (#190282) next »