Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function authenticate($username, $password){
- $loginQuery = "SELECT AdminID,Username,Password,AdminLevel,Lastlogin FROM adminusers WHERE username = ? AND password = ?";
- $stmt = $this->mysqli->prepare($loginQuery);
- $stmt->bind_param('ss', $username, $password);
- $stmt->execute();
- $stmt->store_result();
- $num_of_rows = $stmt->num_rows;
- $stmt->bind_result($AdminID, $username, $password,$AdminLevel,$Lastlogin);
- if($num_of_rows == 1){
- $this->username = $username;
- $this->password = $password;
- $this->authenticated = true;
- }
- $stmt->free_result();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement