ThePlace

Home ] Search ] Resources ] Site Map ] Contact Me ]
Dave's Information Technology Resource

Up ]

Steps to Build a Page ] Tables ] Frames ] [ Forms ]

--- Forms ---

Forms and CGI

bulletTool for displaying and managing data.
bulletUsed for both client and server applications.
bulletForm tag (<form>) contains one or more elements making up the form.  Multiple forms can exist in a document.
bulletKey attributes for the form tag:
bulletaction - file name, URL, or script to be run
bulletmethod - POST (sends form data to server via data stream) or GET (appends data to URL: www.acme.com/cgi-bin/progname?productid=123456).  GET is best for small forms, POST for larger forms and to hide data.  GET is also useful for dynamically constructed URLs with information.
bulletname - object name for the form
bulletenctype - encoding instructions  for the form data (default is "application/x-www-form-urlencoded" - sets spaces to + and nonalpha characters to %, line breaks to %0D%0A).
bulletmailto: is a popular way to submit form information via a browser/mail function (does not work if mail is not set up in a browser).
bulletForm input elements:
bulletbutton - interactive button (major use is in client applications)
bulletsubmit - used to send form data to the action designation.
bulletreset - restores form to original state (not necessarily a clear function).
bulletcheckbox - binary selection
bulletfile - send files to the browser (user must select file)
bullethidden - good for hiding data
bulletimage - can be used as a submit object
bulletpassword - variation of a text box, hides content
bulletradio - group buttons (all buttons with the same name work together)
bullettext - single line text entry box
bulletselect - drop-down and list, use option items for each entry (size="1" causes single line drop down box; size > 1 creates list box).
bullettextarea - multiline text box
bulletUser issues:
bulletMake forms explanation intensive, never assume anything about how data is entered.
bulletTables are a great way to structure a forms appearance.
bulletMake form/input element names meaningful (will help you with client/server apps).

CGI = Common Gateway Interface - the protocol that defines how servers interact with other programs on the server.  Key functions include:

bulletAbility to get information submitted via a browser form (i.e., the program can get data submitted via the form, e.g., fields).
bulletAbility to transmit HTML output.
bulletAbility to access server specific data (e.g., name of server, URL specific information).
bulletAbility to track information between sessions (i.e., pages served).
bulletAbility to call/run/terminate (politely) applications.

 

Home ] Up ] Computer Architecture ] Programming Bootcamp ] Database Bootcamp ] Visual BasicS ] Web Basics ] Web Multimedia ] Web Programming ] Advanced Web Topics ] Developing Web Sites ] XML Technology ] Web Glossary ]

Copyright © 1999 - 2005 
ThePlace - Written and Sponsored by Dave Hillman