note 39436 added to function.unserialize
| From: | yabba at the dot hut | Date: | Wed, 28 Jan 2004 18:09:19 +0000 |
| Subject: | note 39436 added to function.unserialize | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-64324@lists.php.net to get a copy of this message | ||
caveat: stripslashes!!!
if using
setcookie('hubba',serialize($data));
to set a cookie, you might want to check
$data(unserialize(stripslashes($_COOKIE['hubba']));
to retrieve them back!!!
this is, if unserialize fails. you can also print_r($_COOKIE) to look into what you've got
back.
beats me how the slashes got there in the first place....
----
Manual Page -- http://www.php.net/manual/en/function.unserialize.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+39436
Delete -- http://master.php.net/manage/user-notes.php?action=delete+39436&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+39436&report=yes
Search -- http://master.php.net/manage/user-notes.php