After logging out, click the browser and return to the logon page. There are three interfaces: logon. php/checklogon. php/detail. php/logout. php.
Logon. php-session_start () and other static html including form login. click the login button and jump to checklogon. php.
Checklogon. php-connect to the database and return user information. If $ _ SESSION ['user'] = user information is successful, the page jumps to detail. php.
$user = UserBusiness::GetUser($_POST["username"], $_POST["password"]);if($user == null){header("location: /index.php");exit;}$_SESSION['user'] = $user;
Detail. php-a logout link is included in the preceding figure. after clicking it, logout. php.
Logout. php-
After you click the logout button, the page is displayed on the logon page, but after you click the back button of the browser (IE 8/Firefox), the previous detail interface is displayed again. How can we solve this problem.
After clicking the back button, the code in detail. php is not executed, and the cached detail. php code is displayed.
Reply to discussion (solution)
You need to paste the verification section of detail. php to see it.
You have to paste the verification section of detail. php to see if it has been attached.
This is?
You do not have any code to verify the existence of a session, even if you have destroyed the session, what is the purpose?
Modify the PHP login and add the following code.
IsValid ($ _ POST ["username"], $ _ POST ["password"], $ ss_user_id) {$ _ SESSION ["ss_user_id"] = $ ss_user_id; // User IDecho"