
NOTE: Formication is most effective when installed setuid root, because then
a fcnfile can save information in any location writable by the owner of
the file.  When not installed setuid root, all fcnfiles will only be able
to write to places writable by the user running the web server.  While
there is always risk involved in making a program setuid, the author of
Formication has taken the precautions of using "strict" and "taint checking"
to catch potential errors.  In addition, since you receive the source code
under the GNU General Public License, you are free to audit it yourself
for security purposes.

About Formication:
Formication allows a content designer to forward information from form 
submissions to a variety of places.  For example, given the following form:
 <form action=dosomething.fcn method=post>
  Your Name: <input type=text name=name><br>
  Your Email: <input type=text name=email><br>
  Your Phone Number: <input type=text name=phone_number><br>
  Your Comments:<br>
  <textarea cols=80 rows=40 name=comments></textarea>
 </form>

a content designer can easily forward the user's input to:  

 email:
  with Formication, creating a form to email gateway is as writing:
  <mail>
  To: person.to.get.email@example.com
  From: %name% <%email%>
  Subject: Form submission from %name%

  Name:  %name% <%email%>
  Phone: %phone_number%

  Comments:
  %comments%
  </mail>

 a file:
  using the same easy template mechanism used by the mail tag, a
  content designer can save form data to a file:
  <savecustom "userdata.dat">
  Name: %name%
  Email: %email%
  Phone: %phone_number%
  Comments:
  %comments%
  </savecustom>

 a tab delimited file:
  don't want to go through the hastle of putting all the tabs in
  the right place with savecustom?  want to save form data to a tab
  delimited file without any fuss?  just say:
  <savedata "userdata.tabdel">
   name email phone_number
  </savedata>

FlexMail and Formication also give you full control of what the user sees
after submitting a form, again using the same easy template style as the
<email> tag:
 <response>
  <html>
  <head>
   <title>Thank you for your information</title>
  </head>
  <body>
   <h1>Thank you %name%!</h1>

   <p>
   Thank you for the information.  Provided %email% is a valid email
   address, you should hear from us within the next 5 working days.
  </body>
  </html>
 </response>

You can also just redirect the user to a normal html page of your choice:
<redirectto href="http://www.example.com/">

For advanced site developers:

What if you want to make sure the user enters a name and an email address?
What if you don't even want to have the data processed if the user leaves
either out?  Just use:
 <error>Sorry, we need to know your name.</error>
 <require name>
 <error>Sorry, we need to know your email address.</error>
 <require email>
 <mail>
  ...
 </mail>
 <response>
  ...
 </response>

What if you want to use percent signs more than once in a word?  What if
you want your response to be a simple fcnfile itself, which has to have
percent signs that aren't interpreted?  Formication allows you to change 
the delimiters used to fill in templates with the <replace> tag.  
For example:
 <replace>-UberSquirt-</replace>
 <mail>
 To: me@example.com
 From: -UberSquirt-name-UberSquirt- <-UberSquirt-email-UberSquirt->
 Subject: Form information

 -UberSquirt-name-UbserSquirt <-UberSquirt-email-UberSquirt->
 sends these comments:
 -UberSquirt-comments-UberSquirt-
 </mail>

