<?php

class Loginmodel extends CI_Model
{
	
	

	public function login_valid( $username, $password)
	{
		$q = $this->db->where(['uname'=> $username, 'pass'=> $password])
					->get('user');

		if ($q->num_rows()) {

			// print_r($q->result());exit;
			return $q->row()->id;
			//return TRUE;
		}
		else
		{
			return FALSE;
		}
		
	}


}

?>