Return to Snippet

Revision: 47763
at June 16, 2011 00:11 by screon


Initial Code
if ($this->form_validation->run() === TRUE)
    {
                    // save data

        $this->session->set_flashdata('message', 'New Contact has been added');
        redirect(current_url());
    }

 $this->load->view('contacts/add', $this->data);

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

Initial Description
Within your view, you place something like: 

<?=>session->flashdata('feedback') ?>

Initial Title
CI: clearing form after successful submit

Initial Tags
form, php, validation, codeigniter

Initial Language
PHP