PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
if ( isset($_GET['action']) && 'logout'===$_GET['action'] ) {
clearsessionscookies();
}
it does not work correctly...the page at logout is set to go back to the login screen but if i hit the back button it allows the user back in instead of a "expired" or page cannot be displayed. can anyone assist me with this please!
//kill the session cookie
if(isset($_COOKIE[session_name()]))
{
setcookie(session_name(), '', time()-42000, '/');
}
//destroy the session
if(!empty($_SESSION))
{
session_destroy();
}
//set session to an empty array
$_SESSION = array();
Remember, you also have to call session_start(); somewhere before this code (if you don't already)
Set Search Time - A google chrome extension. When you search only results from the past year (or set time period) are displayed. Helps tremendously when using new technologies to avoid outdated results.
thanks bro...that did the trick of killing the cookie...none of the user info shows up after implementation when i hit the back button....however, is there a way to get that ("webpage has expired") message page you get on other sites when you try to hit the back button after login?