RE: [PHP] serialize/unserialize objects
| From: | Krznaric Michael | Date: | Thu, 28 Dec 2000 21:51:30 +0000 |
| Subject: | RE: [PHP] serialize/unserialize objects | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32166@lists.php.net to get a copy of this message | ||
Did you forget about urldecode?
Mike
-----Original Message-----
From: Jeroen Olthof [mailto:j.olthof@millipede.nl]
Sent: Thursday, December 28, 2000 4:49 PM
To: php-general@lists.php.net
Subject: [PHP] serialize/unserialize objects
I want to serialize a object and post it urlencode in a querystring.
this part go's OK.
now I want to build my object again in page 2.
how can I get back mij vars ??
little example
<?
//page 1
include("notitie.php");
$notitie = new Notitie(1,211011999,"this is a note");
$data=urlencode(serialize($notitie));
echo "<a href='invoer.php?stringpassed=$data'>click here</a>";
?>
<?
//page 2
$passedstring = unserialize($stringpassed);
?????
?????
?????
echo object->var1;
echo object->var2;
echo object->var3;
?>
kind regards
jeroen olthof
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net