Advertisement
Guest User

Untitled

a guest
May 13th, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.36 KB | None | 0 0
  1. public function check_pswd($username,$password) {
  2.             $password = md5($password);
  3.            
  4.             $query = 'SELECT * FROM users WHERE username=\''.$username.'\'';
  5.             if ($check = mysql_query($query);
  6.            
  7.             $info = mysql_fetch_array($check);
  8.             $sql_pswd = $info['password'];
  9.            
  10.             if($password != $sql_pswd) {
  11.                 return false;
  12.             } else {
  13.                 return true;
  14.             }
  15.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement