I am developing a drawing register for the company i work for on our intranet. We recently got a new server (Windows 2003), so i installed PHP and MySQL on it.
When a user fills in a web form (i'll call it form.php) on the intranet i make the form post the variables to another file (form-parse.php) which parses the data. If they have not entered the required information i display the form errors on the form-parse.php telling them to go back to the original form and correct them.
My problem is that when they click the back button on the browser the $_POST variables are lost from the form.
I have included value="<? echo $_POST[variable1];?>" for each of the relevant <input> tags in the original form, so i know its not that.
Could it be a setting in the php.ini file or is this something to do with the server settings and this post is in the wrong forum completely.
Thanks for your replies, i have managed to work my way around it, however i experimented a little and found the following results.
On the companies intranet server: I took all the php code out of form.php and renamed it to form.html.
When i filled out the form on form.html and clicked submit (making sure i missed out a required field) form-parse.php throws up an error (as it should). I then clicked the back button on the browser and i didn't need to fill the form in again, the previous data i entered was already there.
On a web server I pay for: I uploaded form.php and form-parse.php to the external server that i have a website hosted on and the whole thing works as it should.
So i shouldn't have to add any extra code to the users data back in the form. Which is why this is puzzling me because i have never needed to do it on other servers.