Validating email in php

Rated 4.45/5 based on 809 customer reviews

The form is created using HTML and validation and processing of the form’s contents is done with PHP.The goal is to teach you some basic HTML form elements and how their data is accessible to you in your PHP scripts.The form you’ll create contains a number of inputs: text fields, radio buttons, a multiple-option select list, a checkbox, and a submit button.These inputs will be validated to ensure, for example, that the user has entered their name.

In this article you’ll construct and validate a simple form using HTML and PHP.

Well, you may notice, the phone number may be written like this format – 91-523-452-5555 in many cases.

That’s why we have allowed “ ” and “-” in the phone number.

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.

The script needs to be able to differentiate between the two stages so the form behaves properly.

Leave a Reply