Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function validate_user($username = "", $password = "")
- {
- $password = md5($password);
- $user_test = $this->CI->db->get_where('users', array('username'=>$username, 'password'=>$password));
- if ($user_test->num_rows() == 0)
- {
- return FALSE;
- }
- else
- {
- $result = $user_test->row();
- return $result->id;
- }
- }
Add Comment
Please, Sign In to add comment