I am trying to use php for my form validation for the first time. I get how to build my errors array and display it. Can anyone explain a technique that I could use to color the field with the error in the form? Dont even know where to start to attempt this. My forms are processed on a separate page.
Share
You could use a multidimensional array:
And the HTML:
This is assuming you aren’t using ajax to validate…