Redirect on page edit after save |
Hi guys am new to the forum
I need to create a form that saves the partial data of a form and continues in another step with the same pageId example: load form->save->after save redirect to editpage/pageId this is the first step code, how do I go to the second step to complete the application form with the same pageid? are slightly desperate ... can someone please help me? thank you Code: function step1()
I think you're asking how to pass the page_id to the next form.
redirect("x\y\$page_id") x is the controller class. y is a function in x. And page_id is the parameter of function y.
Simpler is always better
$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 } |
Welcome Guest, Not a member yet? Register Sign In |