setcookie with array (was serialize)
| From: | Rodrigo Peres | Date: | Thu, 28 Mar 2002 15:25:17 +0000 |
| Subject: | setcookie with array (was serialize) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-90535@lists.php.net to get a copy of this message | ||
Hi list,
Regarding my last post about serialize, I've tried many things but couldn't
make it function.
I'm trying to store the data from a form in order to allow my user to stop
the process of filling the form and retrieve later what was inserted before.
Among many other thing I tried this little script only to test but didn't
work. why??
if(isset($submit)) {
$x = addslashes($HTTP_POST_VARS);
$y = serialize($x);
setcookie("posted",$y)
}
if($posted) {
$w = unserialize($posted);
$j = stripslashes($w);
echo(count($j));
}
The script aways returns 1, but I've submited 10 values.
Thank's in advance
Rodrigo