|
3.1.1.
cgiemail - Form
Processing
Suppose
you want to have an order form on your web page whose result
would be emailed to you, follow instructions below:
1)
Create a file called "order.txt" using a text editor
such as Notepad in your local PC.
2)
Type following lines. Of course, you can add more fields to
fit your specific needs.
|
To:
whatever@whereever.com
From: [email]
Subject: Order from [name]
Customer Contact Information
name: [name]
phone: [phone]
email: [email]
address: [address]
Order Information
Product Purchased: [product]
|
IMPORTANT:
You MUST have the To: and the
Subject: line followed by the
blank line. Those three lines MUST be on the FIRST THREE
lines.
That is the file that will be sent to whatever@whereever.com
Now, cgiemail will automatically replace
[name], [phone], anything in the brackets with the
corresponding user supplied info from the web form.
3) Save this file in plain text mode. Upload it to your main
www/ folder via FTP
or FrontPage98
Explorer.
4) You need to create a web form in html.Here is a part of the
web form page called "order.html"
|
<form
method="post"
action="/cgi-bin/cgiemail/order.txt">
<input type="text"
name="name">Your name?
<input type="text"
name="phone">Your number?
<input type="text"
name="email">Your email?
etc...
|
IMPORTANT:
The
name of the form field (e.g. name="name") must
exactly match the what you put within the bracket in your
order.txt file for it be replaced with the value your customer
enters. For example, if you have <....name="name">
in your order.html and name: [Name],
it will not work.
5) If you want to have your own customized "success"
page, place the following line in your form page:
|
<input
TYPE="hidden" NAME="success"
VALUE="http://[yourdomain].com/somepage.html">
|
It
will then redirect to somepage.html.
|