Return to my Computer pages
Go to my home page
© Copyright 2003, Jim Loy
Many sites, some of the best, have forms. These serve various purposes:
Building the form (you can have more than one form on a page) is easy. Having it send the data to you, one way or another, is not easy to describe. It is not difficult to do. But, how it is done varies from one ISP (Internet service provider) to another. Or you can get your forms from some other site or CD, and have some program somewhere process the data, and send the results to your page.
With my ISP, the first line of the form looks like this:
<FORM METHOD="POST" ACTION="http://www.imt.net/cgi-bin/cgiemail/~jimloy/computer/forms.txt">
We have the <FORM> tag, with a method equal to "POST," and action equal to what looks like a URL. Well, it is not a normal URL. Cgiemail is a CGI program on my ISP's computer which takes the data, along with a file of mine called /computer/forms.txt, and composes email from them and sends it. Here is forms.txt:
From: [email]
To: bogus@bogus.bogus
Subject: [subject]Name: [name]
input stuff: [CheckBox1]
radio buttons: [Radio1]
select box: [Select1]
button: [Button1]
password: [Password1]Comments: [comments]
The names in square brackets are the field names of data from the form. The data labeled "From:", "To:", and "Subject:" go into the header of the email. I have hard coded the "To" address into forms.txt, and the other two come from the form. I have hard coded the subject into the form itself. Everything else in forms.txt is just to format the data. I get email saying things like:
From: Bill@whatever.kom
To: bogus@bogus.bogus
Subject: Forms testName: Britney Spears
input stuff: checked
radio buttons: on, off
select box: item1
button: on
password: realblondeComments: Here are some stupid comments.
The above may or may not be similar to what you must do to process forms. Your ISP probably has instructions on how to do this on their WWW page. If not, contact their technical support. By the way bogus@bogus.bogus is not my real email address; Click Send me email if you want to send me email.
Here are some of the controls that you can use:
That was the end of the form, which ends with the </FORM> tag. Above the form was mainly an unordered list, which is not necessary. It can contain text or tables.
The above does not expain everything, as you will have to deal with your ISP and/or someone who provides form service. Regardless, you should be able to control the formatting of the form itself.