<?php 
class contact_model extends CI_Model {
 public function set_contact($data){
	$this->db->insert('contactus', $data);
 }
 public function get_contact($uid){
	$this->db->where("uid",$uid);
	$result = $this->db->get('contactus');
    return $result->result();
 }
public function update_contact($uid,$data){
	$this->db->where('uid',$uid);
    $this->db->update('contactus', $data);
}
public function is_contact($uid){
	$this->db->where("uid",$uid);
	  $result = $this->db->get('contactus');
	  if(count($result->result()) == 0){
		  return false;
	  }else{
		  return true;
	  }
}
}	
?>