serialize/unserialize objects
| From: | Jeroen Olthof | Date: | Thu, 28 Dec 2000 21:49:17 +0000 |
| Subject: | serialize/unserialize objects | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-32164@lists.php.net to get a copy of this message | ||
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