Using Forms to Retrieve Information

Up to this point all of the web pages you have created have been a one way street, you have supplied information to your visitors but they have not been able to send you information through your web pages. Forms allow your visitors the ability to send you information. There are two parts to every form, the web page that contains the form that the user fills out and a script that handles or processes the information in the form once it is sent back to the server. In this class we will focus on the front side portion, the web page containing the form. The backside portion of the form, the script that processes the information is beyond the scope of this course but will be introduced here.

Recall that web pages are provided to a user by a web server. This might be a computer that you own that is running web server software such as Microsoft's Internet Information Services (IIS) or Apache web server. Or your site might be hosted by an ISP (Internet Service Provider) which is likely the case for most web sites. The user requests a web page and the server sends the appropriate page if it can be found. This part of web page development is know as the front end, what users see. The back end of a web site would be the scripts and software that process data from a form or other type of input. The back end may involve a database to store and retrieve data as well as middle ware. Middle ware is software that takes information from the database and puts it into HTML format or vice versa.

There are several web technologies that can process data from a web page. Cold Fusion, Active Server Pages (ASP), Hypertext Preprocessor (PHP), PERL, C++, and Java are a few. These are server side programs that run on the web server. All of them comply with the Common Gateway Interface (CGI) standards and can be used to write CGI scripts. If you want to further your web capabilities then you might consider taking one of these programming languages at college. The forms that you create in this class will be processed using PHP since this software is free and capable of interacting with a variety of databases. You will never see the PHP scripts since these are handled at the server but you may notice as you visit different web sites that the web pages have a .php or .asp extension. This indicates the server is using this type of technology.

Here is more information about server side technologies.

Now for the bad news, you cannot process the information in forms unless you have a CGI script running on your server and your ISP supports such scripting. There are a couple of solutions to this problem. Choose a web hosting service that supports the scripting language you want to use. Or you can use one of the many forms processing web sites that allow you to create your own forms and then send the data from the forms to you typically in an email message.

Some on-line form processing web sites

W3Schools Forms Tutorial

Now that you know the bad news here is a description of Form Elements

Example of a Google Form