Page 1 of 1

Storing an object in $_SESSION

Posted: Tue Nov 18, 2003 8:00 am
by tekdek
can this be done? does not seem to be working for me
if not is there a way around it?

Posted: Tue Nov 18, 2003 8:15 am
by Weirdan
It can be done. Just include your class definition in each of your pages:

Code: Select all

include 'myclass.php';
  session_start();
  $some_object=$_SESSION['some_object'];
  $some_object->do_something();

Posted: Tue Nov 18, 2003 9:53 am
by tekdek
thanks for the help!... fixed