I have a login function that takes a user name and password. Checks the sql db and then creates a class using data found from db. This class is then serialized and stored into a session varible.
Now upon successful login, the session varible of cClass is unserialized and then the methods are used to extract various data.
This all works fine, but only for the first time... Once the page is refreshed the process of unserializing the class and extracting data gets errors stating that im trying to use a method on a non class object
The error:
Fatal error: Call to a member function on a non-object in /home/gte806e/public_html/clients/includes/master.php on line 74
The line of code that its hitting on line 74 is this and nearby lines.
$cSession = unserialize($_SESSION["cSession"]);
echo "Welcome ".$cSession->getFname()." ".$cSession->getLname();
This is the EXACT same code that is executed the first time without any problems.
Help please!
Jesse