Login from Outlet and Admin Table - 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: Login from Outlet and Admin Table (/showthread.php?tid=73911) |
Login from Outlet and Admin Table - mylovelyn77 - 06-23-2019 Hello All... I am Newbie in CodeIgniter I want to make my own website for my company and I have a problem in making a Login from 2 database table. My Controller : Quote: public function process() Here is My Model : Quote:public function login_staff($username, $password) When I try this code, the page dont show any error,...just return to the login page. please help me solve this problem. tq RE: Login from Outlet and Admin Table - Wouter60 - 06-23-2019 Try one of the available authentication libraries for CodeIgniter, like "Ion_auth" or "Community_auth". It will save a lot of time, and you will have better security. Besides that, learn how to avoid repeating code. E.g. the part where you determine if the user is a staff member or a customer can be way shorter: PHP Code: if ($staff->num_rows() > 0) { |