mm, you must save in the session $_SESSION["someobj"] = $myobj; and make sure that when calling the Ajax PHP file, this includes the class of necessary files, which defines the class $myobj and any object contained in it.
Could you be more specific? I can try.
This is how I create an object, then assign it to a session variable:
include(whateverfilethathastheclassorincludeit.php) $theObject = new TheObjectClass(); //do something with the object or not $_SESSION['myobject'] = $theObject;
This is how I refer to the members of an object in my PHP Ajax call file:
include(whateverfilethathastheclassorincludeit.php) $theObject = $_SESSION['myobject'];
useless
source share