I'm having a problem serializing a class object.
Page 1:
session_start();
include("class.php");
$obj = new Class;
code / content here
$_SESSION['obj'] = $obj;
Page 2:
include("class.php");
session_start();
$obj = $_SESSION['obj'];
When I get to page 2 from page 1, I receive the following error:
Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition class of the object you are trying to operate on was loaded before the session was started in index.php on line 19
If I do a var_dump of $obj on page 2, I get the following:
object(__PHP_Incomplete_Class)
Any help would be greatly appreciated.
Thanks in advance