How to creat remember me checkbox with codeigniter? |
[eluser]Unknown[/eluser]
Hello, I have this code in header to login: Code: echo form_open('login'); Code: function login(){
[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.
[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. |
Welcome Guest, Not a member yet? Register Sign In |