Re: How to use multiple cookie statements
| From: | Ronald \"The Newbie\" Allen | Date: | Tue, 13 Jul 2004 12:23:29 +0000 |
| Subject: | Re: How to use multiple cookie statements | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-190338@lists.php.net to get a copy of this message | ||
Can you use my above values to show me what you are talking about?
"Matt M." <h.dudeness@gmail.com> wrote in message
news:7d458020040712131042aec2a0@mail.gmail.com...
> > <?
> > 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']);