Hello André, Tuesday, March 9, 2004, 10:53:35 PM, you wrote:
AVL> I'm using sessions to manage users, by using cookies to store the AVL> session. AVL> My question is, how do I make the session last _forever_? AVL> ATM the session lasts 'till the user closes the browser. Ok first of all - you cannot make a cookie last "forever". You can set its expiry to be a ridiculous date in the future, but that's all - if the browser removes it during cookie purging, or the user reinstalls something - it's gone. One of the best solutions is to refresh the cookie (without their knowledge) each time they come back to the site. Anyway, onto the meat of your question - give the cookie an expiry date well into the future so it persists until the visitor returns. Look at the help file for details on the attributes you need for setcookie. -- Best regards, Richard Davey http://www.phpcommunity.org/wiki/296.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php