Hi,
You are facing the problem after logout, the user presses back button in the browser window it will shows all the pages visited by him/her earlier know.....
This problem can be easily removed by, you can check for the session variable for userid is set in each and every pages..... If suppose this condition is violated means, you have to forward it to the index page.....
Like just for an example...
[PHP]
session_start();
if ( $_SESSION['userid']=="" )
header("index.php");
[/PHP]
Quote:
Originally Posted by kamill
I have done a logout page for logout from admin section and provides a link to logout from admin section.Whenever i clicked on logout link it redirected to index.php of admin section......BUT when i am tring to go back threw back button of Browser....it send me last visted pages(means sessons not expire properly). How can i solve it... One more thing is that the script is working properly on localhost....problem occures when i uploaded it on server.
code of logout is following....
///////////////////////////////////////////////////////////////////////////////////////////////////
<?phpsession_start();
if($_SESSION['user_id']!="" && $_SESSION['user_pwd']!="")
{
$_SESSION=array();
session_unset();
session_destroy();
?>
<script>
window.location.href="index.php";
</script>
<?php
}
else
{ ?>
<script>
window.location.href="index.php";
</script>
<?php } ?>
/////////////////////////////////////////////////////////////////////////////////////////////