PHP Form Validation Example

* required field.
Name: * E-mail: * Website: Description: Gender: F M *

Your Input:

The validation rules for the form above are as follows:  
Field Validation Rules
Name Required. + Must only contain letters and whitespace
E-mail Required. + Must contain a valid email address (with @ and .)
Website Optional. If present, it must contain a valid URL
Description Optional. Multi-line input field (textarea)
Gender Required. Must select one

Text Fields

The name, email, and website fields are text input elements, and the comment field is a textarea.
Name: <input type="text" name="name"> E-mail: <input type="text" name="email"> Website: <input type="text" name="website"> Description: <textarea name="description" rows="4" cols="30"></textarea>

Radio Buttons

The gender fields are radio buttons
Gender: <input type="radio" name="gender" value="female">F <input type="radio" name="gender" value="male">M
Views All Time
Views All Time
Views Today
Views Today