I’m using PHP for form validation. If the form is invalid, I want to keep the existing values in all of the inputs, textareas, and ‘s. The form’s action is the same page as the form itself, eg:
<form action= method=post>
...
</form>
Is there a way to keep the values of the fields other than echoing the values in every field?
No, there isn’t.
This is why it is generally a good idea to have a routine that templates your fields.