|
Once you've created an online
form, you'll need the user's results sent somewhere.
Our web server has a script to do this processing
for you. This script will email results to an address
that you specify. You just need to complete a few
simple steps. **Note:
If your site is not on the University's webpub server,
this script will not work
(Printer
Friendly Version)
As part of these steps, you need
to add some new tags to your form, and you'll need
to create two files, in addition to your web page.
Configuring
the Form
The first thing you will need to change, is the content
of your form tag itself. The <form> tag needs
to have at least two attributes, method and action.
If you don't already have the method filled in, set
it to POST. The value of the action attribute needs
to be: http://www.brown.edu/cgi-local/eform.cgi
A correct form tag will look like this:
<form
method="POST" action="http://www.brown.edu/cgi-local/eform.cgi">
Once the form tag is correct,
two additional tags need to be added. On the next
line after the above form tag, add two hidden input
tags. They will look like this:
<input type="hidden"
name="_send_email1" value="[SEE BELOW]/email.txt">
<input type="hidden" name="_browser_out"
value="[SEE BELOW]/output.html">
The only thing to change in the
above tags is the SEE BELOW part. First, write down
the URL to your form page. Replace [SEE BELOW] with
everything in between http://www.brown.edu and the
form page name. For example, if this page were going
to have a form, the URL to this page is: http://www.brown.edu/webmaster/webpublishing/eform.cgi,
so I would replace [SEE BELOW] with /webmaster/webpublishing,
and my finished tags would be:
<input
type="hidden" name="_send_email1"
value="/webmaster/webpublishing/email.txt">
<input type="hidden" name="_browser_out"
value="/webmaster/webpublishing/output.html">
Your tags will be different, as
they need to use your URL.
When creating your form field
names, do not use underscores unless you understand
what they mean to this script. To see what using an
underscore in your form name means, check page
3. If you don't understand what this means, the
short answer is use underscores like is described
above with _send_email1 and _browser_out, but not
anywhere else in your form.
Two more steps to go: Create
2 files
If you're confused, or still have
questions, email Webpublishing@brown.edu
|