Hi gang:
Nothing like trying to help someone to raise questions for yourself.
Here's the problem:
http://webbytedd.com/b1/simple-session/
This demo seems to work Okay. The user can't go anywhere unless they
enter 'guest' into the form -- after that, then they can go anywhere
they want.
I do this by simply taking a post variable and if its value is
'guest', I then set a session variable 'ok' to 1. You can see this in
the code, which is highlighted at the end of each page.
When the user leaves the script (via the More button in the top left
corner), they are directed back to my main index page which destroys
ALL sessions -- or -- so I thought.
Please follow, if a user goes to:
http://webbytedd.com/b1/simple-session/
enters 'guest' travels the site, leaves, and returns -- they are
presented with another logon page, just like the first time.
HOWEVER, if the user clicks any of the other pages (2-4) they are
directed back to the first page AND the ok session is magically set
to 1 !!! I have no idea why the session ok is set to 1.
You can see that the session array and post array at the top of the
page are clearly both empty. But if the user clicks any of the other
links the session 'ok' is set to 1 !!! Where does that value come
from???
Apparently, I am not destroying the session, even though I have tried
every example shown in the on-line manual -- and nothing works.
If I shut-down my browser, then everything works the way I want it
for the first time, but for the second time the user visits the page,
the aforementioned problem remains.
So, how doe the session variable 'ok' become 1 again? OR how can I
really destroy a session?
As I said, all of the code is there.
Thanks guys, I'm sure one of you smart people will show me the error
of my ways.
Cheers,
tedd
--
-------
http://sperling.com http://ancientstones.com http://earthstones.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php