php - Basics of a remember-me system -


i using php / mysql login system. add remember-me it. basic mechanics of remember-me? involve adding new column table in mysql of user information stored, etc. ?

thanks in advance,

john

there few different methods this. secure method add field mysql user table , have "remember_me" hash random hash generated.

the hash should stored in cookie on users computer userid validation purposes long remembering period lasts (you should set remember me period in db timestamp security). when pull site, see if cookie isset, if authenticate hash userid. if validates considered logged in. if not validate, send them sign in page / not considered logged in.

this how setup of sites. pain if login computer, no longer validated on computer using , have re-authenticate. security, me, more important them having login again due situation.

edit: see comments below information regarding sessions / security.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -