Amber Suratte

Full Stack Web Developer

Form Validation and Processing with PHP

This sign up form uses server-side code to validate and save form data to a database.

I first built a model class containing methods which validate different parts of the form like the email address and phone number. Once the form is submitted, the data is run through the validator class and the controller passes the relevant error information to the view. In the page's template, Twig conditionals are used to display error messages and apply classes as needed if there are errors.

View on GitHub >

View more student work

© 2022 Amber Suratte