Hi,
Im trying to validate a simple form without losing the already entered info.
someone suggested that i validate the form on itself?
any suggestions would be greatly appriciated
Hi,
Im trying to validate a simple form without losing the already entered info.
someone suggested that i validate the form on itself?
any suggestions would be greatly appriciated
The contents of a file are inserted where the include() call is made.
ahhh…very clever! thanks heaps!!
what do you mean by include file?
thanks:D
You could put the validation code at the top of the page containing the <form>. The form’s action value will then be the name as the current page. The validation code could be inserted as an include file.
At the top of the validation code, first check if the submit button was clicked to determine whether to bypass the validation code or not. If any errors occurred during validation, then you can enter any correct user inputs (from the POST or GET array) as the value of the corresponding input control and then flag the input controls with invalid inputs.