Welcome Guest, Not a member yet? Register   Sign In
Form validation after a redirect
#5

[eluser]TheFuzzy0ne[/eluser]
Your controller should only redirect if the form passed the validation, otherwise the same controller method should just keep looping.

Code:
if ($this->input->post('submit'))
{
    # Set rules
    
    if ($this->form_validation->run())
    {
        redirect('somewhere');
    }
}

$data = array(...);
$this->load->view('some_view', $data);


Messages In This Thread
Form validation after a redirect - by El Forum - 06-02-2009, 06:52 PM
Form validation after a redirect - by El Forum - 06-02-2009, 06:59 PM
Form validation after a redirect - by El Forum - 06-02-2009, 07:07 PM
Form validation after a redirect - by El Forum - 06-02-2009, 07:13 PM
Form validation after a redirect - by El Forum - 06-03-2009, 03:26 AM



Theme © iAndrew 2016 - Forum software by © MyBB