Forum Moderators: coopster
I need to store user ids in a cookie so that they will be remembered when they return to the site.
I'm not happy about storing the id asis in a cookie but I'm not sure of the best, most secure way of disguising the id.
Does anyone have any ideas about this, or any tips for keeping people from tampering with the id and getting access to someone elses details.
(btw, the details are not sensitive, just a nickname and stuff)
12345:asdlfkj2429sdfgckvj9w923rkdf92
Where 12345 is their ID and the rest after the : is their encrypted password. Then you just make sure the encrypted password in the cookie is the same as what you get when you encrypt their password in your db. If they are equal then you let them login, etc.