$_SESSION variable gets lost on FORM action
- From: dreasi0n.php.net@xxxxxxxxx (Nuno Oliveira)
- Date: Tue, 16 Jan 2007 19:02:39 +0000
Hi,
I'm working on a website and one of the features that I've implemented so far is the user timeout.
Every time that a user browses to a different page, the variable named $_SESSION['user']['lastactive'] is updated to the current time.
However, before that, my PHP scripts check if the session for this user had timed out or not...
The script that checks that is named "session.php" and it is included in every file. If it detects a timeout, it sets a variable $_SESSION['form']['errors'] to a string ('Your session has expired... Bla, bla, bla...') and then redirects to the login.php and the user will see that he his being asked to login again for the reason displayed.
Everything works great except in one situation... If the timeout period happens when the user is filling a form, the action that it executes (process.php) will also include session.php and it sets the error string but when it redirects to login.php the $_SESSION['form']['errors'] variable is empty...
Can anyone help me with this?
Thanks
.
- Follow-Ups:
- Re: [PHP] $_SESSION variable gets lost on FORM action
- From: "David Giragosian"
- Re: [PHP] $_SESSION variable gets lost on FORM action
- Prev by Date: Re: [PHP] sms through teleflip and php?
- Next by Date: Re: [PHP] I lied, another question / problem
- Previous by thread: Re: [PHP] sms through teleflip and php?
- Next by thread: Re: [PHP] $_SESSION variable gets lost on FORM action
- Index(es):
Relevant Pages
|