![]() |
How to creat remember me checkbox with codeigniter? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: How to creat remember me checkbox with codeigniter? (/showthread.php?tid=50616) |
How to creat remember me checkbox with codeigniter? - El Forum - 04-02-2012 [eluser]Unknown[/eluser] Hello, I have this code in header to login: Code: echo form_open('login'); Code: function login(){ How to creat remember me checkbox with codeigniter? - El Forum - 04-02-2012 [eluser]InsiteFX[/eluser] CodeIgniter Users Guide - Form_helper check_box In order to do a remember me you will need to create a cookie on the users system if they cheeck the check box! Then in your login code you need to first check and see if they do have a cookie for remember me if they do auto log them into the system else show them the login screen! I create a hash code using their username and password and save that into cookie and their database record. How to creat remember me checkbox with codeigniter? - El Forum - 04-02-2012 [eluser]boltsabre[/eluser] Code: $user = $this->my_mod->user_exist_employer($email,$password); Careful of this, your second call to your model is over writing the results of your first model call because you've called both $user = $this->my_mod-> If the first model call is just setting some session stuff or whatever, not a problem, but if it's returning anything then yeah... you've over written it. |