$checkclass = $db_object->query("SELECT class FROM table_a WHERE username = '".$_SESSION['username']."'");
I am trying to call on a table from my mysql database, and tell it to use the current session's username to pull out the users class. It won't work though. Whenever I call on $checkclass it says Object, and thats all.
To narrow down the problem, try and echo out the value of $_SESSION['username'];
Check that the value exists in the database,
Also, I think when you execute the query statement, the returned value is a resource or an object. for example,
// result is of type resource
$result = mysql_query( $sql );
// to do anything with the result, we need to obtain values
// by using the following
while( $row = mysql_fetch_array( $result ) ) {
// obtain data from array $row.
}