![]() ![]() |
![]() |
||||||||||
|
|
||||||||||
support
Emailing The Contents Of A Web FormThese instructions will help you set up a form on your WWW page that, when submitted, will send the contents of the form to a specified email address.This is not an HTML forms tutorial! An example form is included below, but for advanced forms issues and to learn how to write HTML to include your own forms on your WWW page, see this forms tutorial.
To have the contents of a form emailed to you, we'll be using the cgimail Perl script by William Mee. The syntax for the script is quite simple. When writing the HTML for your form, use the following as a template for the <form> tag:
<form action="/cgi-bin/cgimail?username@wincom.net&This_is_the_subject [Insert form HTML here] </form> In the example above, you must replace username@wincom.net with the email address you want the contents to be sent to (most likely, your email address). You must also make sure that the entire <form action..."POST"> line is all on one line. The only spaces are after the word form and before the word method. After the email address, you have an ampersand (&) and then the subject of the email being sent (This_is_the_subject). This subject cannot contain spaces, so use underscores ( _ ) and they will be converted to spaces by cgimail. You can use a title similar to "WWW_form_response", "Web_mail", etc... After the subject, we have another ampersand, and then a URL for a web page which will be displayed when the form is submitted. This should be the full URL to a web page on the Internet, in the form of: http://www.wherever.com/~whoever/whatever.html. You can use any URL.
Required FieldsYou can also force the client to fill in any of the fields on your form that you wish. This is done by simply appending an asterisk '*' to the name of the field, like in this example:Before: <input name="Email Address" type=text size=20> After: <input name="Email Address*" type=text size=20> Now, if the client does not fill in this field and submits the form, an error message will be displayed informing them to go back and fill in the field.
An Example<html>
<head> <body>
<form action="/cgi-bin/cgimail?someuser@wincom.net
</form>
</body>
|
|||||||||||
|
Corporate Disclaimer Terms & Conditions Advertise with Us Send questions and comments about our site to webmaster@wincom.net © 2002 Windsor Information Network Company, Ltd. ... a Primus Canada Company. |