Creating a model for the login - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Creating a model for the login (/showthread.php?tid=69492) |
Creating a model for the login - mimingko - 12-03-2017 I am trying to learn codeigniter. I followed the Form Validation Example (https://codeigniter.com/userguide3/libraries/form_validation.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 RE: Creating a model for the login - Redwoodcutter - 12-10-2017 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. |