JSHINER Posted December 27, 2007 Share Posted December 27, 2007 My code: function _authenticate($db, $email, $password) { return $db->getRow('SELECT * FROM user WHERE email = \'' . $db->escape($email) . '\' AND password = \'' . $db->escape($password) . '\''); } But when I try to login I get the error: "Fatal error: Call to a member function getRow() on a non-object in /File.php on line 23" Any ideas why? Link to comment https://forums.phpfreaks.com/topic/83380-having-a-problem-with-a-function/ Share on other sites More sharing options...
papaface Posted December 27, 2007 Share Posted December 27, 2007 Have you included the class? Link to comment https://forums.phpfreaks.com/topic/83380-having-a-problem-with-a-function/#findComment-424197 Share on other sites More sharing options...
JSHINER Posted December 27, 2007 Author Share Posted December 27, 2007 Yes that is within "class Auth {" Link to comment https://forums.phpfreaks.com/topic/83380-having-a-problem-with-a-function/#findComment-424198 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.