What is the best thing to store in a cookie to keep a persistent logged-in state?
I have seen many websites (and beginner tutorials!) that simply store something lik
Best practice would be to use a SESSION instead of a COOKIE for use data. COOKIES are used to store generic information not specific information about a user, that's what SESSIONS are used for.