Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14348

Can't set customer form error

$
0
0
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');

            }

        }

    

Viewing all articles
Browse latest Browse all 14348

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>