Originally posted by TimTimTimma
Cookies are the way to go, sessions only last 20 minutes(?) idle time, after that they delete themselves, they also are removed after the script/browser is closed. I am pretty sure only cookies can do this for you, I don't think there is a way to extend a sessions time frame, or a way to have it effect a specific machine? So yeah, cookies are your only other option.
The above isn't exactly true because you can modify how a session behaves through php.ini and [man]session_set_cookie_params[/man] so that it doesn't go away when the browser is closed.
Nevertheless this is an ideal 'real' cookie situation. Setting the cookies won't be your problem, but you'll have to think about how to make the cookie secure so you don't just throw in someone's userid and voila, you get access to all their stuff. Ideally put in a creation time plus a hashed checksum of their userid or username plus some other scrambling string that only you know. Then, if you want, make them relog in when the time set in the cookie is old. Putting a time in the cookie generated from your server also gets you around the problem of time differences in the user's machine and your server and the ubiquitous "Why can't users stay logged in" questions.