cgiemailThe cgiemail program, located on the main web server, provides Form-to-Email processing. You can create an HTML (Web) form that sends the form information to you in an e-mail message. Refer to http://www.wright.edu/cwis/workshop/formcwis.html to see a working example of a form using the cgiemail program. Step 1: Create Your cgiemail TemplateBefore you start receiving e-mail messages through the Web, you must create a template to format the information that will be provided through the Web form. Create a text template similar to below.
For the first column of your template, use common names or words that describe the corresponding form field. When the form is processed by the server, this column will appear in the output e-mail exactly as within your template file. For the second column, use the same value as the field's name property (but surrounded by brackets) as you do within your HTML file. This value must be one word and can contain no spaces or special characters. These words must match exactly for the form to process correctly. When the form is processed by the server, these words will be replaced by the values of your form field's names. Note: The
template's first line must be "to: your
e-mail address" Note: Save the file as ASCII text. Now you are ready to create the HTML form. Instructions for using cgiemail with FrontPage 2000 are located at:. http://www.wright.edu/web/resources/fpforms.html Step 2: Create the FormExample: <form action="http://www.wright.edu/cgibin/cgiemail/cwis/workshop/formcwis.txt" method="post"> <p> <p> <input type="radio" name="gender"
value="Male"> Male <p> <select name="class" size="3"> <p> <select name="housing"> <p> <p> </form> Note that the name attribute of each <input> tag corresponds to what you previously put in each square bracket in the e-mail template. These must match exactly. Only use lowercase letters and no spaces or special characters (e.g. - !, &, *). The action attribute of the <form> tag is split into two parts. Notice that the first part of the pathname refers to the cgiemail program. The second part refers to the location of your e-mail template relative to the Web server (www.wright.edu). If you are using a form on a departmental Web site, the second part of the action line would be the server-relative path to your text template file. If you are using a form in your personal UNIX directory, the form action line would be as follows: <form
method="post" action="http://www.wright.edu/cgibin/cgiemail/~e-mail.name/sample_form.txt">
Once the user submits the form, he/she will receive a confirmation of what was sent.
The e-mail message you receive looks very similar ...
Note: The e-mail message will be from "nobody," so be sure to include an e-mail field on your form if you need to respond by e-mail! Step 3: Post Your HTML Form and Text Template to the Web ServerAfter you post your HTML form and text template to the Web server, test the form by filling out and submitting it a few times. Try to vary your responses and attempt to anticipate any mistakes your intended audience may make. Further information on the cgiemail program is located online at http://web.mit.edu/wwwdev/cgiemail/webmaster.html
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||