Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php store object in session

session_start();

// STORE OBJECT
$object = new sample_object();
$_SESSION['sample'] = serialize($object);

// RETRIEVE OPBJECT
$object = unserialize($_SESSION['sample']);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #store #object #session
ADD COMMENT
Topic
Name
2+7 =