note 27762 modified in function.unserialize by tix
| From: | tix@php.net | Date: | Wed, 02 Apr 2003 13:05:14 +0000 |
| Subject: | note 27762 modified in function.unserialize by tix | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-46122@lists.php.net to get a copy of this message | ||
I've found the base64_encode and base64_decode functions extremely useful for this, especially
when trying to send serialize()'d variables through HTTP requests.
basically, just echo base64_encode(serialize($foo)) in the link/form field/whatever, then
$foo=unserialize(base64_decode($_POST['foo'])), and you'll be happy.
--was--
I've found the base64_encode and base64_decode functions extremely useful for this, especially
when trying to send serialize()'d variables through HTTP requests.
basically, just echo base64_encode(serialize($foo)) in the link/form field/whatever, then
$foo=base64_decode(unserialize($_POST[foo])), and you'll be happy.
http://www.php.net/manual/en/function.unserialize.php