Example Form (Article 1361)

Body

The following form will:

  • Send a mail message to person@company.com
  • Use the mail server at the address "mail.company.com"
  • Require the user to enter a number
  • Require the user to enter their email address
  • Require the user to enter their name
  • Not display what the user types into the enter called "hidden"
  • Add a field to the email message called "TestForm" with a count of the number of times the form has been used
<form action="http://cgi.mercury.net/scripts/mailto.exe" method="post">
<input type="hidden" name="sendto" value="person@company.com">
<input type="hidden" name="server" value="mail.company.com">
<input type="hidden" name="num_num" value="Please enter a number">
<input type="hidden" name="email_email" value="Please enter an email address">
<input type="hidden" name="SERVER_NAME_display">
<input type="hidden" name="uname_required" value="Please enter your name">
<input type="hidden" name="filename" value="test.csv">
<input type="hidden" name="hidden_hidden">
<input type="hidden" name="TestForm_counter">
<pre>
Number: <input name="num" size="10">
Email: <input name="email" size="30">
Name: <input name="uname" size="20">
Hidden: <input name="hidden" size="20">
</pre>
<Press input type="submit" value="Submit"> to send your message.
</form>


Once this form is completed by a user, person@company.com might receive the following email message:
From: John Doe <another@company1.com>
To: <person@company.com>
Subject: Form: http://test/apply.htm
Date: Sun, 10 Mar 1996 19:20:00 +0000
The following form contents were entered on 10th Mar 96
TestForm = 2
num = 234
email = another@company1.com
name = John Doe
SERVER_NAME = www.company.com

The file test.csv would look like:
TestForm,num,email,mame,server_name 2,234,another@company1.com,John Doe,www.company.com