Jump to content

Help with an error.


JSHINER

Recommended Posts

<?php 
class Auth {

function _authenticate($db, $username, $password) {
	if (!ValidText::username($username)) {
		return false;
	}
	if (!ValidText::password($password)) {
		return false;
	}
	return $db->getRow('SELECT * FROM users WHERE username = \'' . $db->escape($username) . '\' AND password = \'' . $db->escape(md5($password)) . '\'');
}
?>

 

How come with the above code I get the error:

 

"Fatal error: Call to a member function getRow() on a non-object in /home/..."

 

Link to comment
https://forums.phpfreaks.com/topic/91279-help-with-an-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.