[eluser]thbt[/eluser]
I'm using the validation class to create and validate a lengthy form -- love the ease with which I can do form validation so far. Following the example in the documentation was easy.... However, the example writes the form data straight to the database. E.g.:
Code:
$this->load->helper(array('form', 'url'));
$this->load->library('validation');
$rules['username'] = "callback_username_check";
$rules['password'] = "required";
$this->validation->set_rules($rules);
if ($this->validation->run() == FALSE)
{
$this->load->view('myform');
}
else
{
// success, write to the database!
}
Problem is, I want to show a preview / confirmation page before writing to the database. In the bad old days before frameworks, I'd just create a confirmation page with a form and a bunch of hidden fields. User would confirm, then I'd validate the data write to the DB. Is there an easier way to do this with CodeIgniter?