Forms going blank?

liunx

Guest
Hello there,<br />
<br />
Quick question.<br />
<br />
I have multiple forms on our website, that are submitted to a PHP mailer - and if blank or incorrect susbmissions are detected, they are shown.<br />
<br />
If this occurs however, and the users goes "back", on some browsers, the input they already entered is blank - the form is like it was when they first requested it.<br />
<br />
Is there anyway to prevent this apart from having the errors shown on the same page, as having it seperate is our first choice.<br />
<br />
HTML: 4.01 Strict.<br />
<br />
Thanks in advance.<br />
<br />
Regards,<!--content-->do both, it is best to check the errors with js, then do it server side, the js error message will not cause the page to be resent, and the server side would be a last line of defence for users that do not have js. Thats what I would do anyway.<!--content-->Okay thanks.<br />
<br />
Out of curiosity though, is it possible to prevent the situation I described?<br />
<br />
Thanks again for your assistance.<!--content-->The reason "some" browsers work is that "some" browsers are simply remembering the values and restoring them automagically. What you should be doing is populating the form fields with the values in the request when you respond with an error. PHP may even have some rather trivial mechanism for doing this.<!--content-->Ah, I see.<br />
<br />
What type of PHP would something like this need?<br />
<br />
If any moderator sees this, could you please move this to the PHP forum?<br />
Thanks in advance.<br />
<br />
Regards,<!--content-->well what you could do it, save the form values to a cookie on the users machine, then when he comes back, request the cookie and populate the form again. Hopefully the user will have cookies enabled, otherwise hes sol.<!--content-->
 
Back
Top