• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Unsuccessful Login

I am new to codeIgniter but I am facing a challenge with login functions.
Look at the code below and advice; This is my logincontroller
    class Logincontroller extends CI_Controller{
        public function index(){
        public function checklogin(){
            $this->form_validation->set_rules('username', 'Username', 'required');
            $this->form_validation->set_rules('password', 'Password', 'required|callback_verifyuser');
        if ($this->form_validation->run()==false) {

        public function verifyuser(){


            if($this->loginmodel->login($username,$password)) {
                  return true;
                $this->form_validation->set_message('verifyuser', 'Incorrect Username or Password. Please try again');
                return false;
I use correct login details but it returns this error message "I 'Incorrect Username or Password. Please try again'
Any advice

If the username/password are indeed correct your $this->loginmodel->login() are broken.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

Users browsing this thread:
1 Guest(s)

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.