Form Validation Using PHP

PHP-Form_Validation

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.

  1. <html>
  2. <h2> PHP Form Validation Example </h2>
  3. <p><span class=“error”>* required field.</span></p>
  4. Name: <input type=“text” name=“name”>
  5. <br><br>
  6. Email: <input type=“text” name=“email”>
  7. <br><br>
  8. Website: <input type=“text” name=“website”>
  9. <br><br>
  10. Comment: <textarea name=“comment” rows=“5” cols=“40”></textarea>
  11. ….

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.

 

Advertisements
Form Validation Using PHP

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s