> hi! how i register a session of an object????
Well, you should just be able to add the object to your $_SESSION array.
The newer versions of PHP introduce new special object methods, __sleep() and
__wakeup(), which can be use to clean things up before being serialized and
reinitialize after being unserialized.
Serialized, by the way, basically means generating a binary string
representation of an object or array.
For example:
class Person
{
var $name;
var $age;
function Person($name, $age)
{
$this->name = $name;
$this->age = $age;
}
}
$me = new Person('Nikolai', 27);
$_SESSION['me'] = $me;
}
When $me is serialized to be stored in the session, it's translated into
something like this:
"Object:Person;7Nikolai27"
(Keep in mind that the above string is not the actual representation; I just
made it up.)
Anyway, you should read up about this stuff in the OOP section of the manual:
http://www.php.net/oop
http://www.php.net/oop.serialization
Take care,
Nik