I have an array recieved by the code
$logged_in=$this->session->userdata('logged_in');
In this I have an element gid. I want to set value in this session with gid=2. How can I set this ??
$data=array('user_name'=>$this->input->post('user_name'),
'user_email'=>$this->input->post('user_email'),
'user_password'=>md5($this->input->post('user_password')),
'product'=>implode(",", $this->input->post('product')),
'compney_name'=>$this->input->post('compney_name'),
'category'=>$this->input->post('category'),
'compney_type'=>$this->input->post('compney_type'),
'city'=>$this->input->post('city'),
'state'=>$this->input->post('state'),
'phone'=>$this->input->post('phone'),
'service_id'=>implode(",", $this->input-
>post('service_id')),
'image'=>$this->session->userdata('images_business')
);
$id = $this->session->userdata('lastid');
$this->db->where('user_id', $id)->update('user', $data);
$this->session->unset_userdata('lastid');