Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- public function check_pswd($username,$password)
- {
- $password = md5($password);
- $query = 'SELECT * FROM users WHERE username=\''.$username.'\'';
- if ($check = mysql_query($query))
- {
- if (mysql_num_rows($check)!=0)
- {
- $info = mysql_fetch_array($check);
- $sql_pswd = $info['password'];
- if($password != $sql_pswd)
- {
- return FALSE;
- }
- else
- {
- return TRUE;
- }
- }
- else
- {
- return FALSE;
- }
- }
- else
- {
- return FALSE;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement