db->insert('user',$data); } function tambah_profil($data) { if($this->db->insert('profil',$data)){ return $this->db->insert_id(); }else return 0; } function login($data) { $query = $this->db->get_where('users', array('username' => $data['username'],'pass'=>$data['password']), 1); return $query->row(); } }