The html generated by my php pages depends on whether or not the user is logged in. For example, if the user is logged in a "logout" link is displayed; if the user is not logged in a "login" link is displayed.
I'm implementing an auto-login function. When the user logs in they can check a box to keep them logged in. If they check this box a random id is created and stored into a cookie and stored into the database along with their user info. (It's similar to the method described [here].
Any ideas or suggestions on how to do this so that it's pleasant for the user would be greatly appreciated.