Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function checkUserLogon ( $username, $password ) {
- $statement = $this->mysqli->stmt_init();
- if ( $statement->prepare(
- 'SELECT id, username, date_created FROM users WHERE username=? AND password=? ' ) ) {
- $statement->bind_param("ss", $username, $password);
- $statement->execute();
- if ( $statement->affected_rows == 1 ) {
- $statement->bind_result($this->user_id, $this->user_name, $this->user_date_created);
- $statement->fetch();
- return TRUE;
- }
- } else {
- return FALSE;
- }
- }
Add Comment
Please, Sign In to add comment