Posted By

screon on 06/16/11


Tagged

form php validation codeigniter


Versions (?)

CI: clearing form after successful submit


 / Published in: PHP
 

URL: http://stackoverflow.com/questions/2802046/codeigniter-form-validation-how-to-unset-form-values-after-success

Within your view, you place something like:

  1. if ($this->form_validation->run() === TRUE)
  2. {
  3. // save data
  4.  
  5. $this->session->set_flashdata('message', 'New Contact has been added');
  6. redirect(current_url());
  7. }
  8.  
  9. $this->load->view('contacts/add', $this->data);

Report this snippet  

You need to login to post a comment.