I have a session script that is working fine, but does not do everything I want...
It prevents users from seeing page content before logging in. (This is good). After they log in, they can browse the site until they close their browser. Then they'd have to log in again. (This is also working.) On each page, I have a call to the session script which checks to see if the session ID has been set.
I'm trying to find a way to destroy the session [session_destroy()] (forcing them to log in again) for ANY/ALL of the following scenarios:
[Assume the user has already logged into my site, but not Logged out, and has NOT closed their browser]
1) when the user links to a site OTHER than mine (session_destroy)
2) when the user presses the HOME button on their browser, leaving my site (session_destroy)
3) user TYPES a different URL in the address bar, leaving my site (session_destroy)
or
4) user exits to another site, and then presses the "back" button on their browser OR types MY url into the address bar to get back to my site. (session_destroy)
ANY/ALL SCENARIOS listed above should FORCE the user to log in again...
Anyone got any ideas?
~Crystal Wood🙁