How to make the user after filling out the form on the web page and clicking on the button further could not get back to this page after filling out the form?

  • if you wish, you can get to where the browser once visited)) why do you need nada? maybe there are other solutions - Ale_x

2 answers 2

The task is rather standard, for example, a test. Answering the question back to go can not. It is solved simply, we write the current status of the user to the session, for example question # 5 and issue the corresponding content, while for all questions the URL will be the same.

The conclusion is that to solve the problem, use the session.

  • It is possible an example with the code. Thanks !! - Andrei2
// Запускаем сессию session_start(); // Допустим юзер нажал далее, на этой странице пишем $_SESSION['page'] = 2 // Номер страницы; // На предыдушей странице пишем: if($_SESSION['page'] !=2) { //Выводим страницу } else { header("location: page2.php"); // Если юзер побывал на второй странице, то на первую зайти не получится }