session expiry

From: Date: Wed, 01 May 2002 11:58:26 +0000
Subject: session expiry
Groups: php.general 
Request: Send a blank email to php-general+get-95501@lists.php.net to get a copy of this message
Hi all, I'm a little confused after reading some of the user notes on the session pages in the manual. I have a perfectly functioning script which i'm happy with which is managing all my sessions. However, the sessions ends when the browser is closed (or they log out). I wish to modify the login form so that they can say "remember me" or "don't remember me" pull-down. So, I need to know what to do in my session to have the session cookie last longer (say 30 days???). I thought it might be something like: <? $expireTime = 60*60*24*30; // 30 days session_set_cookie_params($expireTime); session_start(); ?> or (last two lines swapped): <? $expireTime = 60*60*24*30; // 30 days session_start(); session_set_cookie_params($expireTime); ?> But it doesn't seem to be working. Any ideas? Justin French -------------------- Creative Director http://Indent.com.au --------------------

« previous php.general (#95501) next »