четверг, 16 июня 2016 г.

How to create a form and make it email its content to your mailbox


Did you want to place a form on your web page, but couldn't because you didn't have CGI-BIN access or couldn't find or install a CGI script to handle your form?
Here's an easy to implement method that will simply email the content of a form to the address you specify. The good news is that it does not require any CGI scripts, so you can use it on any web page residing in any web server. The bad news is that not all browsers support this method, however, most recent browsers with email support (with the ability to handle mailto protocols in forms) are likely to work. This method is only suggested in cases where you're not able to use a CGI script. A form handler CGI script is required to support browsers that do not support mailto as a form action. If you're using a supported browser, clicking on the "Email This Form" button will email the content of the form to the test address "dummy1@chamisplace.com"
Your Name:


Your Comment:


The trick is to use "mailto:dummy1@chamisplace.com" (dummy1@chamisplace.com being the email address for sending form data) as the "action" (where you would have otherwise placed the address to a CGI script) in your form. For example, let's take a look at the HTML tags used in the above example:
<form 
  action="mailto:dummy1@chamisplace.com"
  method="POST"
  enctype="multipart/form-data"
  name="EmailTestForm">

Your Name:<br>
<input type="text" size="20" name="VisitorName"><br><br>

Your Comment:<br>
<textarea name="VisitorComment" rows="4" cols="20">
</textarea><br><br>

<input type="submit" value="Email This Form">

</form>
So, go ahead... create your next online form using your favorite HTML editor and simply type "mailto:" (without quotes) followed by your email address for the "action" tag to get yourself a functional online form.
 
To share this: BlinkBits | BlinkList | Blogmarks | Co.mments | Connotea | Del.icio.us |Digg | Facebook | FrankIt | Furl | Ma.gnolia | Newsvine | Reddit | Yahoo
 
Applicable Keywords : HTMLInternetNetscape NavigatorNavigator 3.xWorld Wide Web

0 коммент.:

Отправить комментарий