|
| |||||
![]()
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
The following four examples illustrate basic HTML forms. In each case, the visitor is expected to enter information into the fields displayed on the screen and then click on the submit button (causing the form values to be passed to a specific CGI program for processing). If you use action="mailto:jbrown@eng.utoledo.edu" rather than a URL which points to a CGI program, the HTML form will send a single line which looks similar to the following (broken into three parts here, to fit the display area): FormFullName=John+Brown&FormSID=333-44-5678 &FormDate=Dec+2%2C+1998&FormProgram=Associate+of+Arts &FormComments=This+is+a+test+of+the+mailto+feature. The CGI program must parse this line into identifiers and values. The ampersand character (&) begins an embeded identifier, the equal symbol (=) associates a value with an identifier, and plus signs (+) replace spaces. Also notice in the example above that %2C replaces the comma (,) character. Several other special characters are replaced with similar codes. Use the View Page Source feature of your browser to examine the HTML tags needed for each of these forms.
![]() This form uses radio.cgi which creates a confirmation screen for the single choice selected.
![]() This form uses boxes.cgi which creates a confirmation screen, showing all boxes selected.
![]() This form uses mixed_orig.cgi which creates a confirmation screen, displaying the actual values entered.
![]() This form uses mixed.cgi, creates a confirmation screen showing the values entered, and sends an email to the instructor showing these values.
![]() REMEMBER: If you use one of these example forms, change the action= parameter of the <form> tag to a URL which points to YOUR cgi program, and not that of the instructor.
|
|||||
| |
|
Added to the Web: December 15, 1998. Last updated: December 3, 1998. Web page design by Dan Solarek. |
![]() http://cset.sp.utoledo.edu/ |