Welcome Guest, Not a member yet? Register   Sign In
Can't set customer form error
#1

Hello,

I want to set a customer error message.  Can anyone tell me why this doesn't it appear?

Thanks,

James



PHP Code:
        $this->form_validation->set_rules('username''Username''trim|required|xss_clean');
        $this->form_validation->set_rules('password''Password''trim|required|xss_clean');


        if ($this->form_validation->run() == FALSE) {

            $this->load->view('register/header');
            $this->load->view('register/researcher_form');
            $this->load->view('footer');

        } else {

            $username $this->input->post('username'TRUE);
            $password $this->input->post('password'TRUE);

            // Check the username and password
            $researcher_id $this->user->researcher_login($username$password);

            if ($researcher_id == TRUE){

                redirect("/register/study/");

            } else {

                $this->form_validation->set_message('login failed''Your username and password may be wrong.');
                
                $this
->load->view('register/header');
                $this->load->view('register/researcher_form');
                $this->load->view('footer');

            }

        }

    
Reply


Messages In This Thread
Can't set customer form error - by randomhacks - 03-07-2018, 01:52 PM
RE: Can't set customer form error - by Marcel - 03-08-2018, 04:05 AM
RE: Can't set customer form error - by jreklund - 03-08-2018, 07:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB