Miscellaneous
  Home arrow Miscellaneous arrow Form and Spelling Validation
Try It Free
Codewalker Forums 
  Tutorials  
Database Articles  
Miscellaneous  
Navigation Usability  
PEAR Articles  
Programming Basics  
Server Administration  
XML Tutorials  
  Reviews  
Database Book Reviews  
Linux Book Reviews  
Miscellaneous Reviews  
PHP Book Reviews  
PHP Software Reviews  
Server Admin Reviews  
SQL Tool Reviews  
  Code Gallery  
Content Management Code  
Contest Code  
Counters Code  
Database Code  
Date Time Code  
Discussion Board Code  
Email Code  
File Manipulation Code  
GUI Code  
Link Farm Code  
Miscellaneous Code  
Search Code  
Site Navigation Code  
User Management Code  
Forums Sitemap 
Dedicated Servers  
Download TestComplete 
IBM® developerWorks
Weekly Newsletter 
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
MISCELLANEOUS

Form and Spelling Validation
By: Matt Wade
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2003-07-20

    Table of Contents:
  • Form and Spelling Validation
  • Common Form Validations
  • Spell Checking
  • Summary

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
    Try It Free
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Form and Spelling Validation


    (Page 1 of 14 )

    Most dynamic web sites rely heavily on forms. From user authentication to entry of news items, we use forms to accept user input. There are many different ways we can validate data from the user. In this tutorial, we will examine several of the more common items that need validation and provide examples for each. We will also explore how to check documents for misspelled words and suggest proper replacements.

    Most dynamic web sites rely heavily on forms. From user authentication to entry of news items, we use forms to accept user input. There are many different ways we can validate data from the user. In this tutorial, we will examine several of the more common items that need validation and provide examples for each. We will also explore how to check documents for misspelled words and suggest proper replacements.

  • Common Form Validations - We will use a combination of string functions and regular expressions to validate common data submitted via forms.
  • Spell Checking - Web sites with misspellings look unprofessional. In this section, we will detail how to spell check text input from a form. The spell check script examined in this section will present a practical demonstration of how regular expressions and standard string functions can be used together to perform a useful function.

    Before we jump into the examples, let's talk a little bit about form validations in general. First off, what is form validation? Simply put, it is the process of validating information from a form. This information will vary greatly and could be anything from proper names to zip codes. Validating the data means ensuring that it complies to a set of rules or guidelines.

    You may be wondering why we need to validate data from forms. If we don't validate data coming in from forms, we could end up with totally useless information. Imagine you have a form where you have three fields - name, phone number, and email address. What good does it do you if someone enters in garbage in each of these fields? If you aren't validating the information from these fields, you have no way of controlling the information.

    Another important aspect of form validation is security. By validating the information you receive via a form before using it elsewhere, you can reject or strip out any potentially harmful data and avoid a security breach. It certain situations it is important to be sure that you aren't accepting overly long data. If you were to accept user input from a form and then input that into your database without checking the length of the data submitted, a malicious person could quickly fill up your database.

    In this tutorial, we will explore validation of forms so that you can be sure that the data you are collecting is as you would hope for it to be.

    More Miscellaneous Articles
    More By Matt Wade


       · 
       · Comments given fo title
       · sorry I ran this function and itdidn't work.
       · Remove the echo statement.
       · td.error {color:C03; font-weight:bold; }is incorrect, should be:td.error...
       · td.error {color: red; font-weight:bold; }
       · :)
       · I dont know how this is supposed to work but it doesnt..I can get the spell...
       · HOLY CRAP! I have been stuck on this for about a week and have spent about 6-10...
     

  • MISCELLANEOUS ARTICLES

    - Stopping CSRF Attacks in Your PHP Applicatio...
    - Quick and Dirty AJAX Tutorial
    - Flickr Puzzle Mashup
    - The PAVISE of Security
    - Creating a CAPTCHA with PHP
    - Sending SMS Thru HTTP
    - The Postal Fix - Part 2
    - Adding Mail with Exim
    - The Postal Fix - Part 1
    - Create Your Own Custom API
    - Adding Drop Shadows with PHP
    - Writing a Basic Authentication System in PHP
    - Overlapping Images with GD
    - Using Sockets in PHP
    - Dynamic CSS with PHP





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway