Home

ABOUT BCI

Services offered by BCI

Eligibility

Who is BCI?

List of websites hosted

How to register

MEMBER AREAe

Getting started

Managing your website

Managing your email

Advertising your website

Traffic statistics

Frequently asked questions (FAQ)

Making contributions to BCI

Support


Bahá'í Communications
International

5712 Deerfoot Trail
Fort Worth, Texas 76131
USA


Copyright © 1996-2005 by BCI.  BCI is sponsored by the Spiritual Assembly of the Bahá'ís of Fort Worth, Texas.

 

Using mailform.cgi

mailform.cgi is a script we have installed at BCI that you can use to retrieve information from your forms.  When the user fills out your form and presses the "submit" button, mailform.cgi reads the data that the user typed into the form, prepares an email with this data in it, and sends the email to an address of your choosing.  It also redirects the user to a friendly confirmation screen of your own design.  An example form that uses this script is our own registration form.

To use mailform.cgi, you must edit your <form> tag and include certain hidden fields.  Here is a very simple one-box input form that shows how to use the script:

<form method="POST" action="/cgi-bin/mailform.cgi">
<p>Please enter your name:
<input type="text" name="MyNameTextBox" size="40"></p>
<input type="submit" value="Submit" name="Button1">
<input type="hidden" name="recipient" value="somebody@somewhere.com">
<input type="hidden" name="subject" value="My Form Results">
<input type="hidden" name="email" value="sender@somewhere.com">
<input type="hidden" name="redirect" value="/mydirectory/mypage.htm">
</form>

<form... and

</form>

Type these exactly as you see.
<input type="text"... This is a simple one-line text input field.  You can use other form input types as defined by HTML, such as drop down menus, scroll boxes, check boxes, radio buttons, etc.
<input type="submit"... This is the button the user clicks on to send in the form.  You can change the text on the button by changing the "value" field.
recipient The email address of the person who should receive the form results.
subject The subject line of the email that is sent to recipient.
email The address that the email to recipient appears to come from. 
redirect The URL of the web page that the user is sent to after submitting the form.  This is generally a page within your website that says something like "Thank you for your feedback" and includes a link back to another page in your website.  

If you use your own domain name at BCI (like www.mydomain.org instead of www.bci.org/mydirectory), then you need to ask us to add your domain to our "referrers" list, otherwise the user will see an error message.