security->xss_clean($this->input->post('username')); $password = $this->security->xss_clean($this->input->post('password')); $regioid = $this->security->xss_clean($this->input->post('regioid')); // Search for user $this->db->select('id'); $this->db->where('username', $username); $this->db->where('password', sha1($password)); $this->db->where('regioid', $regioid); $this->db->from('user'); $query = $this->db->get(); if ($query->num_rows() == 1) { return TRUE; } else { return FALSE; } } }