After logging out, click the browser and return to the logon page.

Source: Internet
Author: User
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"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.