Creating a model for the login |
I am trying to learn codeigniter. I followed the Form Validation Example (https://codeigniter.com/userguide3/libra...ation.html).
I have manage to make it work but I would like to ask how would I include a model to validate the username and password in the DB and get the details. Thanks
you can use like this example in Model file.
PHP Code: public function login($table,$email,$pass) and u must change to application/config/autoload.php $autoload['libraries'] = array('session','database'); like that. and make a sure true Config/database.php connect is right and you must create controller like this PHP Code: public function login() i think its gonna be help to u. |
Welcome Guest, Not a member yet? Register Sign In |