[size=10pt]I need to validate some form field info like name, address, zip, email, etc. I am trying to use the process set forth here at W3Schools.com: w3schools.com/php/php_form_validation.asp
I’ve also found several “tutorials” on the subject, most using the same process. This process actually works pretty well. . . . .if there is an error. However, not one single one of the “tutorials,” including W3Schools tell you how to move to the “process” page if/when all of the fields pass the validation. They all use a form action that uses the super global variable “$_SERVER[“PHP_SELF”].” So the form can never leave the form page!
How do I get the form to advance to the process page if the fields pass the validation process?
Thanks!
Ron in Oregon[/size]
) If I create a PHP variable, say $page and set it’s value to the page I want to move to if there are no errors, then in the validation process if an error is encountered I change it to the “self” page. In the form action I will use the variable $page. That way if there are errors, the form will re-display with the errors and if there are no errors, the form should advance to the process page. I’ll test it today or tomorrow.