Form processing

Whenever you want user's input on the web, creating a form to collect that input alone is not sufficient. In order to receive user's input on the web, we need to:

  1. create a form that the user will use to enter data — this involves use of HTML
  2. bring the data the user entered on his machine to the server for processing — this involves the use of a programming language (i.e., ASP, PHP, or JSP).

Bringing the data from the client's machine to the server is commonly referred to as form processing. Form processing involves answering two questions:

  1. How do you collect the data from the user?
  2. What do you with the data you collect from the user?

For the first question, you have to decide the type of programming language you use to collect the data. You may, for example, use ASP, PHP, JSP to process the form data.

The answer to the second question may fall into one (or both) of these categories:

  1. providing immediate results based on the user's input
  2. saving the collected data for further processing

Providing immediate results based on the user's input

You may have used a search engine such as google.com, yahoo.com, or msn.com. When you type a search term in to one of the forms for these search engines, you get immediate results for you inquiry. The search engines use your search term to find the best match for your inquiry. This is processing.

Notice in this example the form processing serves a specific function that the user expects for his term. A form that you create for your website may also have to perform a specific function such as searching based on user's input of a book title, providing contact information based on a user's selection for a specific region, and if you have a specific camera that the user seeks in your stock. Before creating a form, consider what function your form will serve and how you would accomplish that function.

Saving the collected data for further processing

If the function of your form is to gather the user's order details (such as type of items ordered, quantity, shipping address, billing information, etc.), you have to consider storing this information. Without the order details, you won't be able to complete the order! Forms that deal with financial transactions (buying stocks, as an example) or user's personal information (a user applying for a job submits a resume, as an example) should have data storage capability added to the processing of the form.