Forms

Forms are a great way of geting input from your users. If you want to take a survey, want to know how your viewers found your web site or just about anything else, forms are the way to do it.

There are two parts of implementing forms. The first is the HTML interface. The HTML implementation of forms is really easy. That is what we are going to go over in this section. The second part is getting the user's response sent from their computer to you. Getting the form responses mailed to you in a readable fahion, must be implemented in either Javascript or CGI, so we will deal with this part later. But if you have a web page that is hosted by another company like AOL or geocities, they may have a program that you can use that will organize your results for you. If not, at least you will know how to implement the HTML part of forms, so when you do eventually learn the CGI aspect you will be ready to write some forms.

The opening tag looks like the following:

<FORM METHOD="POST" ACTION="the url of your program">

You almost always want to use POST as the METHOD, expecially if you are asking for a password or other private information.

The ACTION attribute should be set to the URL of the program that takes care of your results. You should leave this out for now. If you have an account on a server and they have a program you can use they should be able to give you the URL.

The closing tag is </FORM>.

The following is everything else that goes in between:

You now have enough information to start implementing forms in HTML. Try out a few, mixing and matching the above form elements.

Go on to Main Page...