You have to define the cart class before you run session_start. You can simply include ("cart.php") before calling session_start() function. If you do so, all objects will be unserialized sucessfully.
Quote:
|
Originally Posted by wheezy360
Having troubles with (un)serialization of my cart object.. The data does transfer ok, but it doesn't come out on the other side as being an object of type Cart.. It's possibly due to the fact that I don't have any __sleep() or __wakeup() functions, but I was hoping I wouldn't need to as it's really just an array with functions.
http://www.proteus3d.net/ps2/test_cart.php
[code]
<?
session_start();
include("cart.php");
....
|