<?php
class Mod_user extends CI_Model{
	var $table = "tbluser";
	function __construct()
		{
			parent::__construct();
			
		}

	public function compPassword($username, $password){
        $this->db->select('*');
        $this->db->where('username', $username);
        $this->db->where('password', $password);
        $this->db->from('tbluser');
        $data=$this->db->get();
        if($data->num_rows()>0){
            
            //$this->session->set_userdata('admin', TRUE);
            //$this->session->set_userdata('userId', $userData['id']);
            //$this->session->set_userdata('userName', $userData['name']);
            
			return FALSE;
        }else{
            $userData=$data->row_array();
			return TRUE;
        }
    }
	
	public function changeProfile($data,$id){
		
		$this->db->where("userid",$id);
		$this->db->update($this->table,$data);
		
	}

	
}