Guest User

Untitled

a guest
Dec 24th, 2017
380
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.34 KB | None | 0 0
  1. function validate_user($username = "", $password = "")
  2.     {
  3.         $password = md5($password);
  4.        
  5.         $user_test = $this->CI->db->get_where('users', array('username'=>$username, 'password'=>$password));
  6.        
  7.         if ($user_test->num_rows() == 0)
  8.         {
  9.             return FALSE;
  10.         }
  11.        
  12.         else
  13.         {
  14.             $result = $user_test->row();
  15.             return $result->id;
  16.         }
  17.     }
Add Comment
Please, Sign In to add comment