Problem with sessions!
| From: | Mikael Lundgren | Date: | Tue, 24 Oct 2000 12:25:02 +0000 |
| Subject: | Problem with sessions! | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-3474@lists.php.net to get a copy of this message | ||
I'm having a annoying problem with sessions.
I've been making a knowledge test basically using two files.
file1.php that gets username, starts session, gets number of files from a database etc.
file2.php that show the questions from the database and then returns the answer to file1.php using a
ordinary A HREF.
Everything works fine until it's supposed to close the session (with session_destroy();) the
session gets destroy (i don't get a error message anyway) and
all the outputs are fine. But if i start the program again from the same browser instance it returns
the old data (like username).
So the only thing i know to destroy the session is to close the browser!
I start the session with
session_start();
and then i register a bunch of variables the first time the page is accessed..
and when all output is done i do
session_unset();
session_destroy();
exit;
And close the window (but there's another window behind it)
Please help.. i've tried basically everything but i can't seem to solve it!!!