hi there i've 2 classes Person n Member (extends Person).
i tried to pass a Member obj into the session. when i try
to execute methods from the session i got this error
Fatal error: Call to a member function getFullname() on a non-object in C:\wamp\www\katong\admin\admin_index.php on line 9
sample codes
class Person
{
function getName()
{
return $this->name;
}
}
class Member extends Person
{
function Member($a)
{
}
function getLogin()
{
return $this->login;
}
}
test1.php
$_SESSION["Member"] = new Member($nric);
test2.php
$SESSION['Member'] = serialize($loginPerson);
$loginPerson = unserialize($SESSION['Member']);
echo $loginPerson->getName();