I am developing a web application with php/mysql. The application has many forms, and each form has 30 to 80 fields. The problem is that once the user submits a form, all form inputs are lost if the user wants to go back to the form by using Back button. This is frustrating because the user has to enter all fields again once the submission fails. I noticed this is happeing because I used authentication to protect the form page. If the user has not logged in, the page is rediected by "header(location: 'login-form')". I tried to define the field values as variables as bellow, but it didn't help.
Code: Select all
<input type="text" name="Name" value="<?php echo $FirstName; ?>" size="10" maxlength="30">Thanks in advance.
Ruth