PHP Fatal error: Call to a member function on a non-object

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jarow
Forum Commoner
Posts: 83
Joined: Tue Jan 28, 2003 2:58 am

PHP Fatal error: Call to a member function on a non-object

Post by jarow »

Any idea why I would be getting the above error message on the following line:

$name_check = $db_object->query("SELECT username FROM users2 WHERE username = '".$_POST['uname']."'");

thanks
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

Have you declared $db_object as an object?

Mac
Post Reply