I am trying to do a “Remember Me” on my website and have added the code below to my login script.
The password is started through the sha1 () function, and the username has been truncated and started through mysql_real_escape_string () before assigning it to SESSIONS.
How can I make it more secure against theft.
Thanks.
if($_POST['remember']) { setcookie("CookieUser", $_SESSION['usrename'], time() + 60 * 60 * 24 100, "/"); setcookie("CookiePass", $_SESSION['password'], time() + 60 * 60 * 24 100); }
user652792
source share