do you have register_globals enabled in your php.ini? you also have to have
the class definition available when unserializing it to properly reconstruct
the class with all the methods. if you're using PHP4 it's quite handy to use
the built-in session functionality to implement persistent classes.

HTH

Pavel


----- Original Message -----
From: "andrie" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, March 12, 2001 5:20 PM
Subject: [PHP-DB] serialize


> Hello php-db,
>
>   if i have a class
>      class myDog {
>          VAR $name;
>          Function bark();
>      }
>
>      $dog = new myDog;
>
>   and i want to pass this class over page. someone in this forum said
>   to me to use serialize and pass it using cookies.
>       setcookie("dog", $dog);
>   the question is, when i used unserialize to get this class from
>   other page ,
>      unserialize($dog);
>
>   i have found out that i can find my class structure and it values there.
>   anybody can help me ?
>
> --
> Best regards,
>  andrie                          mailto:[EMAIL PROTECTED]
>
>
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to