This article mainly introduces the PHP blocking page back method, so that the back of the page does not exist to prevent the page back, how to make the page does not exist, the temporary generated page can be, the following examples illustrate this method
For example: Now there are 1,2,3. 3 pages. You want the user to start with the first page and then click Next to see the second page, and then before you go to Page Three, the user cannot step back. Let 1 and 2 be the same page. Leave a mark in the session, so: 1and2.php code is as follows: <?php session_start (); if (Isset ($_get[' P2 ')) {$_session[' enteredPage2 '] = true;} if (Isset ($_session[' EnteredPage2 '))) {//Output page 2. In page 2, include The link to Page 3 is as follows echo "This is page 2." <a href= "3.php" >Page3</a> this time back less than P1 ~ "; else {//Output page 1, contains the link to page 2 as follows echo "This is page 1. <a href= "p2=" ">Page2</a>"; ?> Below is 3.php, the role is to indicate that the user has visited the P2, to allow users to access the P1 code as follows: <?php session_start (); unset ($_session[' enteredPage2 '); In the above example, page 1 and page 2 are temporary pages generated by 1and2.php. When the user's browser to read this address, you output page 2 is page 2, do not worry that users will return to page 1. This is the most fundamental solution that is not browser-independent.