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? Quote 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? Quote 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 {" Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.