Re: Re: $HTTP_SESSION_VARS still holds original values even after unset?
| From: | trlists at clayst dot com | Date: | Mon, 05 Apr 2004 03:15:29 +0000 |
| Subject: | Re: Re: $HTTP_SESSION_VARS still holds original values even after unset? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182320@lists.php.net to get a copy of this message | ||
On 4 Apr 2004 Andy B wrote:
> the next time i hit the "add guestbook" listing from the main screen,
> fill out the form with different values and submit it all the
> $HTTP_SESSION_VARS have the same values as the last add sequence...
There are two problems there. First, your session data is not getting
cleared. Second, it is not getting reset with the new values.
For the former, in guestbook_save.php you can simply do a session_unset
(if you really want to clear all of them). However this does not
handle an abnormals equence -- for example someone hits Back in the
middle of the process.
I don't understand why they are not getting set properly the second
time around. It could be a condition in your code. I'd have to see
the code to have an idea.
Try stripping the code WAY down so you have a test_add.php with a 1-
field form, and a test_review.php that displays that data and saves it
in a session variable, and test_save.php that just displays what it
receives in the session variables. If that still fails, post the code.
If not, your problem lies in the difference between that and the
original code.
--
Tom