Guest User

Untitled

a guest
Oct 22nd, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. <?php
  2.  
  3. class Login_model extends CI_Model {
  4. /**
  5. * Constructor
  6. */
  7. public function CI_model()
  8. {
  9. parent::CI_Model();
  10. }
  11.  
  12. var $table = 'user';
  13.  
  14.  
  15. function check_user($username, $password)
  16. {
  17. $query = $this->db->get_where($this->table, array('username' => $username, 'password' => $password), 1, 0);
  18.  
  19. if ($query->num_rows() > 0)
  20. {
  21. return TRUE;
  22. }
  23. else
  24. {
  25. return FALSE;
  26. }
  27. }
  28. }
Add Comment
Please, Sign In to add comment