Marc Serra wrote:
Hi,
I got problem when i want to save object in session.
I got my first page when I create my object and save it to session:
?php
Require 'test.inc.php';
Session_start();
$test = new test();
$test-Load($_Get['id']);
You can use serialize() to convert an object (or array) into
a string, and store that into the session.
To get back it's original value, use unserialize().
?PHP
$my = new stdClass;
$my-name = 'nick';
$my-comp = 'slow';
$store_this = serialize($my);
// $store_this has value:
//
2 matches
Mail list logo