Re: serialize/unserialize objects
| From: | Jeroen Olthof | Date: | Fri, 29 Dec 2000 00:43:25 +0000 |
| Subject: | Re: serialize/unserialize objects | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-32177@lists.php.net to get a copy of this message | ||
I found it.
I have to stripslashes
so..,
//page 2
$passedstring = unserialize(stripslashes($stringpassed));
echo passedstring->id
""Jeroen Olthof"" <j.olthof@millipede.nl> schreef in bericht
news:92gcg6$50f$1@toye.p.sourceforge.net...
> 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
>