Welcome Guest, Not a member yet? Register   Sign In
Problem with validation redirect
#1

[eluser]jacobson[/eluser]
Hello, I have a problem... I have a register form and I have in my controller "register" a method process which process data from the form, checks validation etc...
I have a line :
Code:
if($this->form_validation->run() == FALSE){
            $this->index();
        }else{
            if($query = $this->data_process_model->add_new_user()){
                $data['main_content'] = 'register_success';
                $this->load->view('includes/template', $data);
            }else{
                $this->index();
            }
        }

And everything workes fine except one thing. When the user puts wrong data it "redirects" by $this->index. But in my URL i have localhost/index.php/register/process address. When I try redirect('register') it works but no errors appears when user puts wrong data, so $this->index() is needed. What can I do in order to have proper url after form submitting.
Thx for respnding.


Messages In This Thread
Problem with validation redirect - by El Forum - 07-06-2011, 07:20 AM
Problem with validation redirect - by El Forum - 07-07-2011, 08:52 AM
Problem with validation redirect - by El Forum - 07-07-2011, 09:11 AM
Problem with validation redirect - by El Forum - 07-07-2011, 09:22 AM
Problem with validation redirect - by El Forum - 07-07-2011, 09:26 AM
Problem with validation redirect - by El Forum - 07-07-2011, 09:28 AM
Problem with validation redirect - by El Forum - 07-07-2011, 03:01 PM
Problem with validation redirect - by El Forum - 07-07-2011, 08:00 PM



Theme © iAndrew 2016 - Forum software by © MyBB