Welcome Guest, Not a member yet? Register   Sign In
Redirect on page edit after save
#4

$this->db->insert('data_form',$data); return you the last_insert_id()


so you can write

$data_form_id = $this->db->insert('data_form',$data);
redirect("backend/page/edit/".$data_form_id);



[...] method edit in page controller

public function edit($data_form_id = null){
if (is_null($data_form_id)){
show_404(); // security
}

// do you stuff with $data_form_id

}
Reply


Messages In This Thread
Redirect on page edit after save - by webgirl - 02-16-2016, 10:17 PM
RE: Redirect on page edit after save - by webgirl - 02-17-2016, 08:06 AM
RE: Redirect on page edit after save - by keulu - 02-17-2016, 09:52 AM



Theme © iAndrew 2016 - Forum software by © MyBB