should be configured to work with Cgiemail. Look at it in a browser, and download it to your hard drive using FTP so you can see
how it works. If you ve never dealt with HTML forms before, don t worry, they re easy to create and understand.
The form prompts the user for data which is sent to the server as simple key value pairs. Each tag specifies a record. The
key is given by the
name
attribute, and the value is given by the
value
attribute. The
type
attribute tells the browser what kind of
data to expect. Now, try looking at the example.
Please note that the hidden items are used to transmit critical info to Cgiemail. They provide the location of the success file, the
name of the person the results should be sent to, and the subject of the form. When making your own forms, you may want to
change the email address in the "required to" field, and likely the subject in the "subject" field. The first item tells Cgiemail what
to show the user after successfully completing the form. You can, but don t need to customize this.
After that come the items that are actually presented to the user. You ll want to use type=text input items with cgiemail: it s a
simple tool. The size=60 tells the browser how big to make the box. The name=something is required in each input tag, otherwise
the browser wouldn t know how to send the data to the server. The value=" " attribute is correct in most cases, unless you want a
default value in the form.
Note that if a field begins with required , cgiemail will require that the user enter a value for this field. This is particularly useful
if you want to require a user to submit their email address.
When the user presses the Submit button, the data goes to our machine where cgiemail starts doing something with it. What is
does is controlled by the order.txt file discussed below.
By the way, you can name your HTML form anything you want to.
order.txt
Now that we have all this data, what do we do with it? Mail it, of course! But for flexibility, cgiemail requires that you create a
mail.txt file to show it what to send. (If you didn t want flexibility you d use a mailto link.) The program will read this file,
perform substitutions, and pass it to the mail system.
Make sure that you upload mail.txt in ASCII mode. Failure to upload mail.txt in ASCII mode will generate the message:
"Server Error: The server encountered an internal error or misconfiguration and was unable to complete your request."
There is already an example order.txt document in the forms directory in your www directory.
By the way, there s nothing magical about the name order.txt. Feel free to call it mail1.txt or form1.mail, or whatever suits you, as
long as the form has the correct name for what you uploaded.
Note that the first several lines are mail headers. You probably shouldn t change that part, or the corresponding parts in your form.
In particular, there must be a To: header or the mail won t go anywhere!
What cgiemail does is simply replace every string that looks like [key] with the value the user typed into the field with name=key.
That s all. You can lay out your form as is best for your users, but lay out your mail.txt as is best for you to read. You can even
insert gobs of text to help format the output. Only the [key] parts will be replaced by cgiemail.
Cgiemail does not report environmental variables like FormMail will, but other than that, it is an excellent program, allowing you
more flexibility in the way you want your data returned by the form.
Secure Server Order Forms
Normally, any text (such as your credit card number) sent from your browser to the web server is sent as plain text. This means
that a hacker could potentially intercept (however unlikely) the information sent from your browser and read it. However, by
using the secure server, the information is encrypted before it is sent from your browser. It would be practically impossible for
anyone to decrypt it without knowing the key. Please use the secure server only when necessary, as when requesting sensitive
information from your visitors.
<
New Page 1
Godaddy Web Hosting