Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Login_model extends CI_Model {
- /**
- * Constructor
- */
- public function CI_model()
- {
- parent::CI_Model();
- }
- var $table = 'user';
- function check_user($username, $password)
- {
- $query = $this->db->get_where($this->table, array('username' => $username, 'password' => $password), 1, 0);
- if ($query->num_rows() > 0)
- {
- return TRUE;
- }
- else
- {
- return FALSE;
- }
- }
- }
Add Comment
Please, Sign In to add comment