Code: Select all
<?php
$User = new User; //Declare new class
$User ->Import($INFO, $ID) //Imports variables from database to $User
$_SESSION['User'] = $User
?>Code: Select all
<?php
echo $_SESSION['User'];
?>Code: Select all
<?php
echo $_SESSION['User'] ->ID; //Echo part of class
?>what am i doing wrong??Fatal error: The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition user of the object you are trying to operate on was loaded _before_ the session was started in /var/www/html/SciFi/shop.php on line 69