FORM TUTORIAL, by T. O' Donnell. [For an example of these special HTML tags in action, see my OMNI script.] A web page form is HTML code designed to send unique surfer input from the browser to a cgi script. The data is sent in the format NAME, VALUE, where NAME is equal to the item name and VALUE is equal to its value. This is accomplished by putting special tags in the code of the web page. Here are the tags:
. This tells the browser that all the tags between these two, if they are form data tags, are to be sent to the cgi-script.] This tag allows you to put information in the page which is HIDDEN from the surfer, but which may be vital to the operation of the script, like an email address to send the data to. This displays a text input box in the browser, defines its size, and the maximum length of the text string that will be allowed to be entered. [Hackers like to try to overload scripts with lots of text, and cause a server to crash, as this can give them write access to it.] These are radio buttons. You can select only one at a time, because here they all have the same NAME. That's the trick if you want to have mutually-exclusive options in your form. These are tick-boxes. A surfer can tick or un-tick a box. In this example, one box is checked for him, the other is unchecked. This is a drop-down menu. This is a password box. The text entered cannot be read in the browser. These are submit and reset buttons. As specified above, you finish your form with this tag: and the form is ready. See my CGI tutorial for tips on how to set up a CGI script to accept form data.