I have a multipage form and I track the position of of the user across different pages with $_SESSION['current_page'] which is going to be reinitialised with every new page
<?php // page1.php
$current_page = 1;
$_SESSION['current_page'] = $current_page;
...
?>
I use $_SESSION['current_page'] to correctly process the submission of each form and redirect to the next page. Yet this solution stops working if the user hit the go-backwards button on her browser when she is, for example, on page 2: she will be moved to the cached version of page 1 and yet the value stored with $_SESSION['current_page'] will be 2. Then if the user hits the submit button on the cached page 1, she will be redirected to page 3.