Adding a guestbook or form to your web page is a fairly simple task, but does require some work from you, the client. Forms work through the use of CGI (common gateway interface) Scripts that are basically programs that reside on our server and when called upon, perform an action. The action being an E-Mail form in this case. This program works by taking the data that someone has typed in, places it in a text file, and then e-mails this text file to the administrator of your web page. There are three Items required to make a form work:
1. First decide what type of input boxes you will have. Here are
some examples:
Start with this line: <FORM METHOD="POST" FORM ACTION=" [......PATH......] " >
This is the programming for the different types of input fields.
<INPUT NAME="blank" TYPE="text" SIZE="20"> | |
<SELECT NAME="pulldown"> <OPTION SELECTED>Select Here...<OPTION>#1<OPTION>#2<OPTION>#3</SELECT> | |
Here: Or Here: | Here:<INPUT NAME="circle" TYPE="radio" VALUE="1" checked> Or Here:<INPUT NAME="circle" TYPE="radio" VALUE="2"> |
Click Here: And Here: | Click Here:<INPUT TYPE="checkbox" NAME="box" value="1st"> And Here:<INPUT TYPE="checkbox" NAME="box" value="2nd"> |
<TEXTAREA NAME="comments" ROWS="4" COLS="40"></TEXTAREA> |
So that you can understand the code here is some help:
The last thing to do to complete the code is put a SUBMIT button and/or CLEAR button in your HTML and then end the form with the closing form tag. The buttons are automatically created with the text that you type in the VALUE statement. It looks like this:
<INPUT NAME="name" TYPE="submit" VALUE="Submit This Thing"> | |
<INPUT NAME="name" TYPE="reset" VALUE="Wipe it Clean"></FORM> |
3. Finally, you need to create a text file. The CGI program reads
the input from the HTML page and places the information into this text file and then mails
it. In creating this file, topics such as Name, Address, etc... aren't necessary,
but if you use them place them first, followed by the variables that are inside brackets.
Save this text file with the same name you specified in the beginning of the FORM tag.
Here is an example:
First Name: [Name1]
Last Name: [Name2]
Address: [Address]
Your E-Mail: [Email]
From: [Name]<[email]> To: tron@xforce.com Subject: GUESTBOOK ENTRY [Name] [email] [url] [hometown] [browser] [browser2] [times] [timespent] [computer] [monitor] [how] ([specify]) [more] [maillist] [guest] [comments] |
Now you should have the knowledge needed to add a guestbook or form to your web page. If you have any other questions, just contact the tech support staff of your ISP.
All Artwork & Design © 1997-1999 Krit Spooker |