Go back in multiple pages form

dobelmakokcici

New Member
I am currently building a multiple pages form using \[code\]$_SESSION\[/code\], everything has been working fine so far. Yet, even though I am able to retrieve all the data at the end of the 6 pages, it seems that it is not possible to go back in the form if the user made a mistake. Let's say he is at page 5 and he realizes that he needs to go back to page 3 to change something, he won't be able to do so. Firefox gives this error message :Document ExpiredThis document is no longer available.The requested document is not available in Firefox's cache.As a security precaution, Firefox does not automatically re-request sensitive documents.Click Try Again to re-request the document from the website.This is what my forms look like, this one is Form-1.php :\[code\]<form action="Form-2.php" method="post"> <fieldset> <legend>Information</legend> <p> <label for="name">Name</label> <input id="name" type="text" name="name" required/> </p> <p> <label for="age">Age</label> <input id="age" type="number" name="age" placeholder="Ex. 1988" required/> </p> <p> <input id="sex-m" type="radio" name="sex" value="http://stackoverflow.com/questions/10547694/Male" required/> <label for="sex-m">Male</label> <input id="sex-f" type="radio" name="sex" value="http://stackoverflow.com/questions/10547694/Female" required/> <label for="sex-f">Female</label> </p> </fieldset> <input type="submit" value="http://stackoverflow.com/questions/10547694/Next page"/></form>\[/code\]I am using \[code\]$_SESSION\[/code\] to retrieve data from the previous form, this one is from Form-2.php :\[code\]<?php session_start(); $_SESSION['name'] = $_POST['name']; $_SESSION['age'] = $_POST['age']; $_SESSION['sex'] = $_POST['sex']; session_write_close();?>\[/code\]And so on for the six pages. I finally send all the data to Print.php for testing purposes, it looks like this :\[code\]<?php session_start(); echo $_SESSION['name']; echo $_SESSION['age']; echo $_SESSION['sex'];?>\[/code\]Of course, it prints all the values collected from the six forms, but I simplified it here. It works fine, it retrieves all the values correctly, but it is not possible to go back when filling the form.What am I doing wrong? How can I make sure the user will be able to go back if he makes a mistake?Thanks for your help.
 
Back
Top