Hi,
I am trying to use session instead of cookies as my targeted customers are
either behind a firewall or disable cookies.
My system
php 4.0.1pl2
rh 7.0
What would be the best way to use a session. I a database to store
the session id and then delete it on exit or expiry. I hope someone can
help me?
I start of by registering a session in session.php
<?
session_start();
?>
I pass the session id using
<a href="test.php?<?=$SID?>">Click here</a>
This works fine. I do not want any one to go to the test.php with out a
proper session id.
In the test.php I have:
<?
session_start();
?>
Some html text and a log out link. I do I test that the session id
created in session.php is the same as the one in test.php. If it is wrong
I want the viewer to go back to the sessions.php page and then come to the
test.php.
In the logout.php I have:
<?
session_destroy();
?>
According the manual this should destroy all sessions. I get any error
saying that the session what not started and cannot be destroyed. So I
added
<?
session_start();
session_destroy();
?>
No errors but, if I use the url in the browser's history I still can go to
the test.php page which I don't want.
Regards
Adrian
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php