update data session variable codeigniter framework

how to update session codeigniter with update data in table this my controller function?

function update(){
	$data = $this->session->userdata('logged_in');
	$data['nama'] = $this->input->post('nama');
	$data['umur'] = $this->input->post('umur');
	$this->db->set('nama', $this->input->post('nama'););
	$this->db->set('umur', $this->input->post('umur');)
	$this->session->set_userdata('logged_in', $data);
}

done bro.