The Little Guy Posted August 22, 2008 Share Posted August 22, 2008 any suggestions on how I could/should do a "remember me" for a user login? Link to comment https://forums.phpfreaks.com/topic/120901-remember-me/ Share on other sites More sharing options...
cooldude832 Posted August 22, 2008 Share Posted August 22, 2008 Cookies but the cookie needs to contain some salted ID linking to the User in the table Link to comment https://forums.phpfreaks.com/topic/120901-remember-me/#findComment-623207 Share on other sites More sharing options...
The Little Guy Posted August 22, 2008 Author Share Posted August 22, 2008 salted, as in an encoded value? that I can decode? Or a unique user id, such as: ujr4gfiu4r2uh4gr4t89rg ??? Link to comment https://forums.phpfreaks.com/topic/120901-remember-me/#findComment-623220 Share on other sites More sharing options...
monkeytooth Posted August 22, 2008 Share Posted August 22, 2008 <?php $cookytme = "+604800"; $mmsalty = sha1($username); setcookie("remembered", $mmsalty, time()+$cookytme); ?> +3600 is an hour +86400 is 24 hours +604800 is 7 days concept to make a time frame is 60 seconds x 60 minutes = +3600 3600 seconds x 24 hours = +86400 86400 seconds x 7 days = +604800 Link to comment https://forums.phpfreaks.com/topic/120901-remember-me/#findComment-623221 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.