> Our hosting company sets session vars to expire every 15 minutes. > > I've setup an Admin Center for users to enter various types of information, > some of which, for example entering a basketball team roster, can take > slower users upwards of 25 minutes or more. > > The result? Admin user spends 25 minutes entering data; clicks the submit > button; then is redirected to the login page because their session > expired! -- all form data is lost -- not good.... > > Is there a way to extend the php session timeout for particular pages? > Alternatively, is there a way, other than using cookies, to store user data > from page-to-page? > > Thanks for any leads,
Yeah, I get occasional complaints about this problem -- although I don't have to contend with sessions expiring every 15 minutes! I've found that it's usually possible to use the browser back button to return to the form with all values still in place (Windows 98-IE6 being an exception), then open a new window to log in again, then return to the form window to submit. Those instructions can accompany your "not logged in" message. Admittedly an inelegant solution, but it's better than losing the form data. In my situation, I've considered rewriting the PHP script that's receiving the form post so that if the session has expired it will re-display a simplified version of the form (without showing protected content) with the posted data, and provide a link to open a login form in a new (small) window. HTH -- Lowell Allen -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php