Welcome Guest, Not a member yet? Register   Sign In
Stop Backdoor
#1

[eluser]Unknown[/eluser]
After successful login I am storing a variable in session then on homepage I am checking it , whether it exists or not?, and I am also destroying the session on log out
but when I log out then I am going to log out page but when I am clicking back button I am coming back to the home page (previous page)
and when I refreshing the page I am again getting sign out.
How to solve this error and how to destroy session on Log Out Only.

Gary
#2

[eluser]skunkbad[/eluser]
You need to send no-cache headers on any page has content that is based on login.
#3

[eluser]Unknown[/eluser]
How to set no-cache header on any page, please reply, can you give me the complete code for login, home and logout.
#4

[eluser]InsiteFX[/eluser]
Place this at the top of the page that you do not want to cache:
Code:
<?php
// Set no caching
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
?>




Theme © iAndrew 2016 - Forum software by © MyBB