What is form Validation ?
This is the process to validate web form according to our data format, when the user try to submit wrong data in the field, server will not submit wrong data because we have restricted(validate) the all field according to our required data format. The validation can be done in PHP where developers set some rules. For example: If the name field is blank, then the code will take the user back to the form and display an error message.
HTML Form : This the HTML form, I have used in this form four field text box, radio button, textarea and Submit button. Please check below code.
- <h2> PHP Form Validation Example </h2>
- <p><span class=“error”>* required field.</span></p>
- Name: <input type=“text” name=“name”>
- E–mail: <input type=“text” name=“email”>
- Website: <input type=“text” name=“website”>
- Comment: <textarea name=“comment” rows=“5” cols=“40”></textarea>
Read Full Blog at: Form Validation Using PHP
You can check more informative blogs and tutorials at android development blogs section and can also browse the android developer forum for posting and viewing latest questions on android development.