Required field will check whether the field is filled or not in the proper way.

Most of cases we will use the * symbol for required field.

php dinamic input form validating-86

In this article you have learned how to create a simple HTML form and validate it with PHP.

Along the way a number of techniques have been used to re-display user input and display error messages.

Iain Tench has worked in the IT industry for 30 years as a programmer, project manager (Prince2 Practitioner), consultant, and teacher.

As a project manager, he specialized in integration projects mainly involving payment systems in the financial sector.

Validation means check the input submitted by the user.

There are two types of validation are available in PHP.

This prevents the form from breaking if the user submits HTML markup and also is a means of protecting against XSS (Cross Site Scripting) attacks, which attackers will use to try to exploit vulnerabilities in web applications.

Now that you’ve defined the form in HTML, let’s identify the two stages the form goes through – when the blank form is loaded, and when the user has completed the form and clicks the submit button.

this script does what i want but the thing is i have no idea how to validate the from fields generated by this script.