<?PHP
	class m_login extends CI_Model{
		
		public function __construct()
		{
			parent::__construct();
		}
		
		function check($dataUser) // ambil data dr DB
		{
			$query= 'SELECT * from admin where username = "'.$dataUser['username'].'" and password = "'.$dataUser['password'].'";
					';
			$rs = $this->db->query($query);
			return $rs;
		}
		
		//change password
		function change($data,$id)
		{
			$this->db->where('idAdmin',$id);
			$this->db->update('admin',$data);
		}
	}
?>