giridharseel Posted February 15, 2009 Share Posted February 15, 2009 $q = "SELECT password FROM ".TBL_USERS." WHERE username = '$username'"; $result = mysql_query($q, $this->connection); if(!$result || (mysql_numrows($result) < 1)){ return 1; //Indicates username failure } plz explain the above code Link to comment https://forums.phpfreaks.com/topic/145263-verify-the-user-is-in-databasehelp/ Share on other sites More sharing options...
drisate Posted February 15, 2009 Share Posted February 15, 2009 select the password from the table called TBL_USERS where the username is equal to $username Then if no result (!$result) or numbers of row is smaller then 1 (mysql_numrows($result) < 1)) it return 1 (username failure) Link to comment https://forums.phpfreaks.com/topic/145263-verify-the-user-is-in-databasehelp/#findComment-762572 Share on other sites More sharing options...
Lodius2000 Posted February 15, 2009 Share Posted February 15, 2009 why would you be using oop for the connection and not the query, also the use of $this is odd, unless we are inside of a method here Link to comment https://forums.phpfreaks.com/topic/145263-verify-the-user-is-in-databasehelp/#findComment-762607 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.