Welcome to the www.dtp-aus.com ennyForms script - version 2.07b April 2000
IMPORTANT INFORMATION THAT MUST BE READ

The program "ennyfrm.cgi" was written (and ©) by Ron F Woolley, Melbourne Australia. Copyright 1998'99 2000. This program can be altered for private site use and commercial site use,
EXCEPT THAT:
  ALL COPYRIGHT NOTICES must remain in the code, visible on all output pages,
  AND ALL of the header notices MUST REMAIN intact visible as is,
  AND using the script(s) without first reading the README.HTM, is prohibited.

Australian copyright is recognised/supported in over 130 countries per Berne Convention
and other treaties ( including USA ) - copyright registration is not required!

The scripts and associated files remain the property of Ron F Woolley.
NO PROFIT what so ever is to be gained from users of these scripts for the use of these
scripts, except that a reasonable minimal charge for installation may be allowed if installing,
as a site developer, for a user on the users site that is not on / in the developers domain.
This program must NOT be used for multiple ennyForms users on one site/domain
and the program and resources must not be supplied as a remote service

Ron Woolley, the author, MUST be notified via the addresses/URLs below
if any monetary charge is applied for the installation of these scripts.

NOTE: If you use these files, you do so entirely at your own risk, and take on full responsibility for the consequences of using the described files. You must first agree that Ron Woolley / HostingNet, the only permtted supplier of this and/or accompanying files are exempt from any responsibility for all or any resulting problems, losses or costs caused by your using these or any associated files.

If you disagree with any of these requirements,
you must immediately destroy all files.

Although this program script is free to use, if you use it and find it useful, a donation to help continue this support and keep new scripts / upgrades coming would of course be appreciated.
      On line Visa / MasterCard payments are available for donations and low cost installations.

These files can only be obtained via the above web addresses, and
must not be passed on to others in any form by any means what so ever.
This does not contradict any other statements above - and ensure you have the latest.


DESCRIPTIONCREATING FORMSMUST HAVE TagsADDITIONAL Tags
OBJECT FIELD MARKERSCONFIG VARIABLESINSTALLINGUTILITIES

Update** Version 2.07, March 2000 **Update
Formerly named "anyForm"

History...
Version 2.03
- Date / Time / Referer IP# or Host to DB output, almost Unlimited Form Objects, new "opts" [ n ] switch, plus fixes.
Version 2.04 - • Ability to hide particular input data when the auto response /C/ opts switch is used to return a full form copy. • Also using the /C/ opts switch an alternative that scrambles an input field to x for all characters ie xxxxxxx xxxxx. • Added the ability to replace the default webmasters email address with one or more addresses via a simple form specific file ie to multiple recipients. • A simple hash (#) deletion/addition now allows alternative data base saving record field delimiters... plus other minor internal changes.
Version 2.05 - A bug fix in the multi recipient mailing option when also using the "subscriber" option. Also added is 1) the abilty to use each form either via SSL or standard server URLs - this allows the preview to receive the correct URL for SSI, while other forms can be standard (new "opts" /S/ switch). 2) the ability to not only "scramble" input values in the auto response mail, but also scramble in the recipients e-mails - ie save CCard numbers to database but not show in any e-mails (new object "name" marker "s"). 3) the ability to switch off webmasters email (new "opts" /x/ switch). 4) the ability to switch off the preview for each form separately (new "opts" /X/ switch). 5) the ability to mark input selections for "Totalling" numeric values (new object "name" marker "t").

• Not requiring a version upgrade (December), two config variables have been renamed (correctly) from $cgi_path and $SSLcgi_path to $cgi_url and $SSLcgi_url. This should only interest those persons upgrading.

Version 2.06 - The "subscriber" option has at last been supplimented with an UN-Subscibe option. Also added is a "user selected recipient(s)" option requiring the use of a new "reserved word" for object names ("Recipient"). A new variable has been included in the config file bringing ennyForms mail list subscribing options in line with ListMerge v2.0+. AND all previous "recipient" mail list files need to be edited to accomodate a name with the To: / From: mail headers (if not updated it will not create a problem). AND all previous subscribe tag values MUST include a new format - a simple addition of ":1" characters after the mail list name.
....Version 2.07 is an easy upgrade from v2.06 allowing each form to include an override for the Subscriber mail list format, another list format of "Address and Date", AND the ability to include an extra checkbox in a form allowing the user to select whether they want to receive mail-outs from the list in normal Plain Text OR HTML formatted mail; the latter being a ListMerge v2+ option!

USERS UPGRADING from v2.03 NOTE
One or two files have to be prepared manually for some options, using a file name created from the forms "frmName" hidden value (lowercase characters - first 8 characters, then minus any spaces). ie "Test Feedback Form" would have been used as "testfee". Where this has been the case for existing forms, please add one more character if there were spaces removed requiring only perhaps 7characters etc. The problem has been fixed and as per sample the resulting file name would be "testfeed" - spaces and non numeric characters will be stripped (_ underline allowed). New users only have to read the following and not worry about this.

ALL UPGRADES
Also note that all .cgi and .pl files should replace previous files... and the config file contains additional and redundent (v2.03) variables.
Version 2.06/7 includes all NEW require files one of which is a new module for un-subscribing. The program file has been chopped for better efficiency. All existing files should overwrite with out problem, change the two path variables (twice each) near the top of the program code, and new/changed variables have been added to the config file - also see modread.htm.
v2.07b - minor upgrade to e-mail date - international smtp compliant format but reflecting your local time as proper GMT reference.

MENU


Low cost installations can be carried out by the author; see program page for details link.
This program must be compiled by Perl versions 5+, on Unix servers with Sendmail

ABOUT

Using 'modules'... allowing:

Saving of e-mail addresses to list files (E-Lists and ListMerge compatible)
Offer an UN-Subscribe option on forms too
Saving of data using one of two methods, to flat-file data base files
Use your own "Thank you" page when needed.
Add a reference "quote" number to the output
Return a copy of the visitors input to the visitor
Apply any of the above separately to each form.
Add header/footer files to the default "acceptance / thank you" page just by their existance
.....see samples.

The "modules" are covered separately in the supplied "modread.htm" file.

Version 2.0 was the first release of ennyForm with the added MODULE options, and there are a couple of easy changes for users of earlier versions of ennyForms. All relevant files are supplied in one compressed .zip file that includes the recommended directory structure. It is assumed that the .zip file has first been un-compressed to the root directory of your LOCAL computer creating the default directory structure included in the .zip file, and described below. A utility to create the default recommended cgi-bin subdirectories, file names, plus chmod permissions is included, and another to first check the Perl version.

This program is to be compiled by Perl versions 5 on Unix servers, using Sendmail.

NOTE: ALL mail address files created for foms ("multi recipients" and "user selected recipient" address files) AND the config default can now contain a name with each address which is added to the mail headers. Note the samples where a name is added AFTER the address divided by " : ".

Realise you do not have dedicated custom software, and that is why ennyForms appears complex - to help webmasters receive as much versatility as possible for their web site without expensive dedicated custom programming.

You have to think in terms of what you can do and then create forms that will get your info in a way that is also suitable for a particular program - ennyForms is very flexible in this regard.

Appreciate and support ennyForms and you will definitely like v4 when it eventually arrives.

The code of all supplied samples will help you understand the hidden tags, objects "name" markers, restrictions and requirements - while referring to this readme as you go ( read it in detail )

One Script handles most mail forms
Most scripts often referred to as Feedback Forms or Mail Forms have but one purpose, to send submitted html form information directly via e-mail servers without manipulating the data in any way. ennyForms is designed to handle submitted information from almost any Mail Form without having to set up the script for each form, or include an abundance of hidden input values. All you have to do is design each form in your html editor, and when finished add a few characters to each Input-Tag name plus some "must have" hidden values. The input tag "names" become labels in an optional Preview Page before sending, and the formatted text of your received mail via one or different addresses.

EnnyForms v2.+ accepts multiple choice selections from drop-down menu lists:
ie add the word MULTIPLE to a <SELECT ......> object (<SELECT  MULTIPLE ......>). This option is often underestimated. This also applies to ALL "grouped" objects (all exactly the same name) like checkboxes - instead of having a number of boxes adding to the length of the labels list in the e-mail, ennyForms will trap all values from same named objects and neatly add them to just the one label (common object name) with each value separated by an asterisk "*", ie:
   
"Info Request: Hotels * Book Shops * Salons".

Now Create basic On-Line Order Forms with ennyForms v2.04 - (not carts)
Two of the new options are in response to users wanting to use ennyForms for order forms and single page shopping carts etc using SSL. Of course the mail response will include such info as credit card numbers and whatever. But you can now use ennyForms unique easy field marking system to also either hide individual input details from the response mail, OR replace details with a series of "x"s.

v2.05 adds further support for SSL by including a new "opts" switch that will tell the program to swap the default program URL with a sercure server URL. This is necessary to imbed the correct URL in the preview page. So if a form uses a secure server URL, then add the following to the "opts" tag:
  <input type="hidden" name="opts" value="S"> - see the new $SSLcgi_url variable below.

Also in 2.05 is the option to "scramble" marked input not only in the auto respond e-mail (/C/ switch), but now also scramble the same input in the webmasters recipient mail (so allowing sensitive data to only go to a database file). The new /s/ "opts" switch enables this:
  <input type="hidden" name="opts" value="s">

The problem with Mail-Form type programs is that the one script has to work with an unlimited number of form variations. Also, understand the server will often not know an input object exists on a form unless its value is more than null (nothing) OR - values that include a "null" choice in "required" button or menu choices should have the [ value="" ] attribute added to the tag! - note some wysiwyg editors do a great job (read useless) of removing null value attributes so you want so be observent. One helpfull work around is to a " " (a space) value instead of "". The browser will then send the " " value and ennyForms will detect and convert the space as nothing allowing error responses; even in "required" drop list selections etc.... (ie <option value=" " selected> Select </option>)

....this can also be used to some advantage as a section sub heading in the preview and output mail lists from large forms by dividing different sections of submitted data with a "hidden" tag (no _H marker - see below) and giving them a " " space value - the space is stripped but guarantees the object will be sent by the browser. This has shown to be of some benefit when staff etc have to read and copy details from e-mails for other purposes!

v2.06 includes two new useful options.
   1) User Selected Recipients
   2) Subscription UN-Subscribing
1. Via an object (drop menu) or grouped objects (radio buttons) named with the new reserved word (Recipient) the user can select where or to whom the e-mail(s) are to be sent. Current versions of ennyForms allow for "multiple recipients" mailing via simple form dependant files containing one or more addresses (the files have an extension of ".adr").

Keeping the program versatile the user selected recipients option uses a different file extension (".rcv") and they just have to be named exactly the same as the selected value chosen from the list - one file for each. These files can contain one OR more addresses also for multi recipients. By using independent files many ennyForms forms can use the same (or some of) those addresses. NOTE: A hidden "Recipient" named object can be used to override/replace the normal multi recipient option!!

2. From v2.06 onwards, the value of ALL Subscribe/Un-Subscribe objects (must be named "Subscribe" - a reserved word) MUST contain two additional characters. They are either:
  ":1" subscribe or ":0" un-subscribe. See the modread.htm page for more detail.

v2.06 allows for the inclusion of the "From:" names with the addresses in the multi recipient address files AND the new "user selected" multi address files and the config default - see samples.

v2.06 You can replace the default mail texts above the footers by creating a form specific text file and using the opts /m/ switch. See the "Returning an Input Copy" section of the "modread.htm" file.

Your Domain.Name
You MUST alter
all reference to "yourdomain.name" in the "enyfrmset.pl" 'require' file, plus change the configuration variables in "enyfrmset.pl", also described in this Readme text.

Please NOTE:
If you install and use this script, please contact us at enyformsreport@dtp-aus.com with server type details and how the script installed and worked etc, for our report base.
( a vote at cgi.resourceindex.com - via red form on the ennyForms program page - or any other cgi links site would also be appreciated to help "spread the word" and keep it free )
  Thank you.

MENU


CREATING YOUR FORMS

Be patient!
First use one or two of the basic supplied forms, set them up and make sure they work before jumping into a complicated and "pretty" form. Leave the options and modules alone until simple forms are proven to work! There are several sample forms to set up and test before tackling specific forms.

Then the easy and most obvious way to create forms for ennyForms is to first ignore all of the following options descriptions and just design your form as usual with all of the necessary input objects on the page.

Once this is finished and the general look of the design is satisfactory, all one has to do is follow the steps below and in the "modread.htm" help page and edit the form objects "name" attributes in the html code plus add a couple of must-have "hidden" input tags - and any of the extra "hidden" tags that enable chosen modules etc. Just how you use ennyForms is often up to your imagination! because of the many possible variations.

Enable MODULES LAST
Remember, module enabling should be left until the basic mail-form is working and responding to user input (ie submit your form(s) FROM your self for tests and e-mail formatting checks).

RESERVED or SPECIAL WORDS
To easily enable the new modules added to versions 2+ on as many forms as needed on your site, there are a number of reserved words that should not be used for general input object names. This should not be difficult to check and the special words are;
frmName, email, subject, return, mailto, opts, db, thnx, subscribe, send, DTME, TTME, ENVREF, Total.Value,
Recipient, Mail-Format.

NOTE: Please note that users of the E-Mail Lists Saving module and/or my ListMerge program may have to use one common input tag "name" attribute for all forms requesting the visitors first or full name to take advantage of ListMerges' powerful mailing options. The modules help page (modread.htm) will describe when this is needed.

MENU


'MUST HAVE' input tag "name"s

The FORM NAME (hidden tag) - frmName
NEW
from version 2 onwards. You MUST include a hidden tag as the unique name of each form, and not create your own "hidden" tag only if you wanted to as in previous versions. This new hidden tag is named "frmName" and must be spelt exactly as shown. The value will be displayed on the preview page, and most importantly, will be used to create files names should some of the new modules also be enabled:
<input type="hidden" name="frmName" value="Book Orders">
    previous users note the changes highlighted further up this page

The SUBMIT BUTTON - send
Your new form will have a "Submit" button. What ever name you applied to that button on any form, you MUST change that name to: "send". The "value" of the button (visible text) can be anything you want. The script looks for the name "send" and ignores it at output of the preview and e-mails. The submit button tag should look something like this:
<input type="submit" name="send" value="Send To Mail">

The E-MAIL ADDRESS INPUT BOX - Email
You must force the sender to add their email address for identification and the mail send 'from' entry. The script looks for this name - "email", upper or lower case - ie email or Email or EMAIL. A simple check of the fundamentals of address structure is also applied and can report an error:
<input type="text" name="Email" size="25" maxlength="35">

The SUBJECT INPUT (box or hidden) - Subject
Again for the mail send headers subject line, and perhaps for your own comprehension of the texts, you must have a subject input tag. This can be a hidden tag or an input box. You should force the "subject" name with the "r" value (see "field markers" below). The script will look for this name, ie:
<input type="text" name="B2Subject_35r" size="20" maxlength="35">
<input type="hidden" name="18subject" value="More Information request">

The RETURN URL (hidden) - return
A name with the characters - "return" - is looked for by the script. It will not output this name value at all, but embeds it as a hyperlink in the final 'success' or 'thank you' page so the sender can go to a page of your choice, or use their Back Arrow. This value should be either a full URL, or a relative path relative to the scripts cgi-bin and not the original form ie:
<input type="hidden" name="return" value="../whatsit.html">

NOTE: DO NOT include a name="??" attribute (see below) to your "reset" button should you use one. That name can be returned by a browser and listed as a "Label".

MENU


ADDITIONAL INPUT TAGS

An Alternative 'mailto' input name - superseded but still available!
The config file in the sets directory contains a variable for your email address. Naturally, without this the mail cannot be sent and there would be an error. But if you want to send any of your forms to an alternative address, place a hidden input option in the form with the name "mailto" and a value containing the alternative address. The script looks for this name and then overrides the default value, if "mailto" is found ie:
<input type="hidden" name="mailto" value="harry@yourdomain.nme">

NOW v2.04+ NOTE: Multiple or hidden single addresses
The simple "mailto" override option has been retained, but if you want the contents of a form to arrive at several different addresses (cc) OR you do not want a single address to appear in your form code as with the mailto method (hide it from spam robots!), then the new option of placing one or more addresses in a simple file, named by the first 8 alpha-numeric characters of the forms "frmName" hidden tag - all lowercase - and with the extension of ".adr" will be looked for by the program. IF the file does not exist or contain data, then ennyForms will simply use the programs default webmasters address OR the old "mailto" override tag if it exists.

There is a simple sample file supplied in the "mailfrms" sub directory of the cgi bin (testfeed.adr). Note that the sample name of that file has been derived from a supposed "frmName" attribute of "Test Feedback Form". This should help you understand how to create the filename for a particular form. Note any addresses in this file must be on one line and if multiples, each address is to be seperated ONLY by a comma [ , ]. Again refer to the contents of the sample.

An Alternative 'Thank you' page
NEW from version 2 onwards. A new option has been added to version 2 to override the default submission success and "thank you" page with a page of your own. To enable this in any form, just add the following hidden tag that contains the full path (or relative path relative to the script):
<input type="hidden" name="thnx" value="../bloggs.htm">

Switching OFF confirmation e-mails
NEW from version 2 onwards. Sending a confirmation e-mail to the visitor is now by default. However, it can be switched off with a new hidden tag that is also used to enable various new 'module' options. To disable the confirmation email, add the following to the "opts" value:
<input type="hidden" name="opts" value="T">

Removal of all Empty Input-Object Labels
NEW from version 2.03 onwards. Some form object names, although empty, can be sent by the browser. If you do not wish to see objects NOT selected / filled listed in the preview and or output email, then add [ n ] to the "opts" value. To remove all empty Labels, add the following to "opts":
<input type="hidden" name="opts" value="n">

Turn Off the Preview option
NEW from version 2.05 onwards. To switch off the preview option for a specific form, a new "opts" switch has been included replacing the previous config file variable. To turn of the preview add the following to "opts":
<input type="hidden" name="opts" value="X">

Switch Off Webmasters E-Mail
NEW from version 2.05 onwards. To disable e-mail from a form to the webmaster (perhaps for database saving only), the "opts" switch /x/ is available. To turn of webmasters e-mail add the following to "opts":
<input type="hidden" name="opts" value="x">

NOTE: The value for the "opts" hidden tag can have several different letters included together to create many variations for different forms.

For a complete list of the "opts" options, see "modread.htm"

Previous users of ennyForms v2.03 ALSO see ADDRESS CONFIRMATION MAIL below.

MENU


For INTERMEDIATE installation experience - Help / Advice information is available.
INPUT OBJECTS FIELD MARKER METHODS

EnnyForms uses a unique method for simply checking:
• the sort-order of input entries in the preview page and sent e-mail
• hidden tags that can appear in the webmasters e-mail, but not in the preview
• the length of input in the text entry boxes - especially useful for older browsers
• hide individual form fields from the visitors auto response
• replace individual form fields in the visitors auto response with "xxxxx"s

FIELD MARKERS and NAMES EXPLAINED
Placing each form object on your form at design time, give each object (text box, radio buttons, check box, select list, hidden, text area) a name exactly as you want it displayed in the preview page and received email. ie "Club-Name", or "Age" could be the selection from a drop-menu list, "Comments" could be the large text area used for visitor feedback comments etc and so forth. Input names should not contain spaces, so multiple words must contain a legal character between them ie one-two (but NOT the underscore as in one_two. This is about the only restriction). You can try using spaces in place of the hyphen (-).

Some other programs use templates and long single hidden tags for similar control. But back and forth reading a hidden tag containing 100 object names, or tracking a template with many object names is no fun. ennyForms is ideal for large forms and form output control. Don't number sort your objects sequentially (ie use 05, 10, 12, AA,AD, AG etc) and it is simple to add new objects to the form later. And to remove an object, do just that - nothing else to edit.

Sorting Output - the sort values MUST be in every user designed input object "name".
When form object names and values are sent to a script via the Environment String, their order is mostly unpredictable. To display the names and values in a predictable way we need to have a method of doing this after they are received by the script. My system is very simple. Once you have designed your form, in front of each name that is to be displayed in the preview and received email, simply place two characters representing the alphabetical order in which you want them to appear - 00 to 99, AA to ZZ, aa to zz, or combinations of them - ie 1A. The script will sort them according to these double leading characters, and then strip those characters from the names (capitals have priority over lowercase, numbers have priority over alpha-characters). You can even change the order from the way they appear on the form just by changing the two numbers/characters around!

   <input type="hidden" name="05Age_5r" size="4">

Hidden Input
Should you wish to pass information to the e-mail output, but not show it on the form, the <input TYPE="hidden" ... attribute is used. So, any such options you want to appear in the webmasters email, but not in the preview, must have "_H" added to the end of the name. The _H will also be stripped with the input name only displayed in the received email ie:
   <input type="hidden" name="08Page_H" value="Three">

Checking Entry Length
If you want to check the length of visitors entries (recommended for visitors with older browsers), place a number "_??" after the name and underscore where ?? equals the maximum number of characters you will allow. This is done for several reasons, not the least of which is when idiots paste a whole page of indiscriminate text just to muck up the system or try to crash the server. The "_??" is then stripped from the input option name (NOTE the environment string is also stripped of html tags).
   <input type="hidden" name="4AState_20" size="20">

Visitors 'Required' Input
It is common to have quite a few input text boxes, radio buttons, checkboxes etc in an email contact form, but not all are made compulsory or 'required' entries. By adding "_r" to the input option name or adding "r" after the maximum length "_??" value the script will report an error prompting the user to go back and fill in the missing box or whatever (see sampcode.htm and the code below). This is also stripped from the name.
   <input type="hidden" name="40Company_25r" size="25">

Hiding Individual fields from the visitors e-mail - using the /C/ "opts" option ONLY.
• Useful only when using the /C/ "opts" option for a return of a Copy of all input to the visitor.
ennyForms sites are using the program for receiving orders and single page shopping cart type forms.

However, should the visitor inadvertently supply perhaps a common office e-mail address or similar, everyone might get to see Credit Card details etc - not good... and sending by e-mail should be avoided anyway! To overcome this ennyForms will now look for the characters "h" and "s" (both lowercase). An "h" tells the program NOT to include that field data in the visitors e-mail, AND the "s" scrambles that fields data by replacing all alphanumeric characters with an "x". ie a credit card number of "1234 5678 9012 3456" would be shown as "xxxx xxxx xxxx xxxx". To Hide or Scramble is up to you - people might be impressed by the obvious display of protection with the scramble method.

To HIDE, just add the letter "h" to whatever is after the underscore ie:
   <input type="text" name="55CC-Number_19rh" size="20">

To SCRAMBLE, just add the letter "s" to whatever is after the underscore ie:
  <input type="text" name="A5Card-Number_16s" size="16">

Simple but unique "Numeric Totalling" of select lists and checkboxes etc
v2.05 now includes another object "name" marker option telling the program to ADD the received value for a "Total Value" displayed in the e-mail and savable to a database. To add a value to a total figure then just add the letter "t" to whatever is after the underscore ie:
  <input type="checkbox" name="56Gift-Box_t" value="18.45">

Try the "sampcde4.htm" sample form (and "sampcde5.htm" for SSL) with the data base "form2.tpt" template and the "testfeed.adr" multi-recipient address file to test these options (make necessary changes in the <form action="...... attribute and change the sample addresses to your own in the address file).


• So, we could have: "_H", "_45", _30r, "_16s", "_25rh" and so forth after the input object names •

These are sample varations of input option 'names'.
  "03First-Name_Hr"
  "04Email_45r"
  "A1Subject_40r"
  "10Wage"
  "3HCard_rs"
  "08Age"
  "1bComments_1500r"

The preceding sort-order characters do not have to be in the same order in the form!

'MUST HAVE' input option 'names" variations.
  "frmName"
  "15Email_45r"
  "10Subject_H"
  "05Name_25r"
  "return"
  "send"

Optional input 'names'.
  "mailto" - field markers not used
  "thnx" - field markers not used
  "opts" - field markers not used
  "Recipient"
  "Subscribe"

View the html code in the supplied sampl code htm files and look through all the 'input' tags. Tha samples can be prepared with the correct <form action... values and tested to see what lists and data base files are created etc (most also shown here).

Combining the input tags and the "opts" hidden tag "switch" values can create many different possabilities. NOTE: the same "frmName" value can be used on multiple forms each performing different tasks while using/writing to common files. Users are even known to be using the program as a preferred front end to more complex data base programs - discarding internal forms!

<form method="POST" action="http://yourdomain.name/cgi-bin/ennyfrms.cgi">

<input type="hidden" name="frmName" value="Feedback Form">
<input type="hidden" name="mailto" value="override@yourdomain.name">
<input type="hidden" name="return" value="http://yourdomain.name/dir/wizza.htm">

<!--optional--->
<input type="hidden" name="thnx" value="http://www.yourdomain.name/oops.html">
<input type="hidden" name="opts" value="T">     <!--switches OFF confirmation e-mail-->

     <center><table border="0" cellpadding="2" cellspacing="0" width="515">
     <tr><td align="left" width="60%" valign="top">

Subject: <br>
<input type="text" name="01Subject_35r" size="25" maxlength="30"><br>

Full Name: <br>
<input type="text" name="03Name_35r" size="25"><br>

E-Mail Address: <br>
<input type="text" name="02Email_45r" size="25" maxlength="35"><br>

Where are you from?<br>
<input type="text" name="08Location_45" size="30"></td>

     </tr><tr><td valign="top" align="left" width="0">

Enter your Comments / Suggestion:<br>
<textarea name="12Comments_1000r" rows="6" cols="55" wrap="yes"></textarea><br>

     </td></tr><tr><td valign="middle" align="center">

<input type="submit" name="send" value="Send E-Mail to Webmaster">

     <input type="reset" value=" Reset All Options ">
     </td></tr></table></center>

</form>

MENU


CONFIGURATION VARIABLES in DETAIL
ALL COPYRIGHT NOTICES MUST remain in the code and output pages, visible as is.

GMT TIME ZONE reference
As with www.dtp-aus.com, Hosting services are being used now that are "remote" from ones local ISP service. Normally this means that all of our scripts etc report dates and times different to that of our local access points, ie our home locality from where we view our sites. To overcome this I use a Perl facility that allows us to use (G)reenwich (M)ean (T)ime with an offset reference reporting in my local time and date. One of the perl "require" files, 'gmtset.pl', contains a variable name - $gmtPlusMinus - whose value MUST be set for your local GMT offset. I live in a world time zone 15 hours ahead of that of my Host Servers. Therefore, when I set the variable to 36000 (+10hrs = Melbourne Australia GMTime), the lists record, and I view, all dates and times relevant to my locality irrespective of where my Hosting service is....
...with this method I can move my Domain and the results would not change.

NOTE: Most people will be able to find out their local GMT value in hours (plus or minus) by looking at the clock setup on their PC.

The calculation is simple. Your local GMT time, multiplied by 60, and multiplied by 60 again. ie 10X60X60. Therefore my variable entry is "$gmtPlusMinus = 36000". If your GMT zone is a negative value, simply include a negative value ie "$gmtPlusMinus = -36000". If you want the dates/times to be the same as the servers, simply enter the value for the servers GMT zone.

US, BRITISH, AND INTERNATIONAL(new) DATE reporting $dt_US
ennyForms uses a common date format in the basic mailed output. However, (NEW from version 2 onwards) some of the new "modules" available with version 2 output date records to files. To allow you to set the format applicable to the majority of visitors in your country, the $dt_US variable has been added to the config file. The value choices are commented in the config file (enyfrmset.pl).

CHECKING FOR CORRECT REFERRERS @referers
This is a security feature and should not be ignored!
This option in the 'enyfrmset.pl' file allows you create an "array" of Domain names and IP numbers that ennyfrm.cgi will respond positively to. By including the acceptable calls to your pages and/or your IP#, ie 'www.yourdomain.com' and yourdomain.com' you effectively stop improper additions to your lists from distant sites (entries are only accepted from pages on your site, not remote copies of your pages elsewhere – they try all the time). The array is named "@referers" and you simply (MUST) enter your preferences in place of the examples. NOTE: The brackets, quotes and commas enclosing each item must be included else an error will occur, ie:

This option will even stop you from accessing the program via a browser command line OR remote copies of forms on your local pc - ie upload and use ONLY the html form page on your site!

('www.yourdomain.com','yourdomain.com','000.000.000.000',). Leave out the IP# if you do not have a true domain name with a static IP#. "www.ahost.net/mysite/" etc will also work for second level site calls etc, but not the IP#. If your scripts are called from the cgi-bin of a domain that is housing your site and your specific scripts are in that domains cgi-bin, you may have to include the cgi-bin also in relevant urls ie: "ahost.net/cgi-bin/". The script builds a full URL with each of these before checking.

IF using an SSL URL, then add it to this array (see the config variable "$SSLcgi_url" below)


At this point I will bring your attention to the semi colons ( ; ) appearing at the end of each line in the config files and the single or double quotes. These MUST remain else an error will occur.


PATHS TO FILES ACCESSED BY SCRIPTS
The defaults used in the ' enyfrmset.pl ' file assume you will place these files in your cgi-bin and add directories to it called "sets". If you have to use other directory names, or your "cgi-bin" has a different name, then you will need to change the paths accordingly; "cgi-yourdomain" is not uncommon. There are three path types that can be used at various times with in a program or script. A full URL is the same as the path you enter in your browsers address box when typing in a site path that you wish to go to: ie 'http://www.wooz.com/harry.htm'. A relative path is a path description to a source, relative to the directory of the program, file or web page that is calling it: ie "jimbo.htm" means that the file being called should be in the same directory. "inone/jimbo.htm" refers to a file that should be in a directory named 'inone' which is a subdirectory within the current directory, and "../jimbo.htm" means that the file should be in a directory one above the current directory, and "../../jimbo.htm" is in a directory two above etc.

For some servers, a simple relative path called by a script may be unacceptable, so an absolute path relative to the sites root directory must be called. There are also variations to this description but "web/yourdomain/yourdirectory/jimbo.htm" (example only) is a relative root path description that works on many servers. Another root path is "/home/yourdomain/www/yourdirectory/jimbo.htm". If you have trouble with accessing the default simple relative paths included in the 'enyfrmset.pl' file, try the root reference ie "web/yourdomain/cgi-bin/sets/enyfrmset.pl" etc. If this is still a problem, look in any installed scripts on your server for a reference, or contact your hosting support staff.

NOTE: If you have problems, double check ALL permission's (below) before changing the default paths, unless you know in advance what the paths should be, and reload files to double check that you used ASCII transfer mode for all text files.

MAIL PROGRAM server path $mailprog
Similar to the Perl program path, this path has to be known for ennyForms to send submitted mail. If you do not know what it is or cannot find reference to in other installed scripts, ask your Host service support staff. The default is $mailprog = "/usr/sbin/sendmail";

FULL URL TO ENNYFRMS.CGI $cgi_url
The value for the variable named "$cgi_url" in the config file needs to be altered to include the FULL URL Path to the ennyfrms.cgi script. It is bly suggested that the script is placed in your cgi-bin or equivalent secure directory (some servers do allow non cgi-bin script directories).

SSL FULL URL TO ENNYFRMS.CGI $SSLcgi_url new v2.05
The value for the variable named "$SSLcgi_url" in the config file needs to be altered to include the FULL URL Path to the ennyfrms.cgi script VIA a secure server. This will be accessed when the "opts" /S/ value is included in the form. The purpose is to imbed the preview page with the same secure server URL used in the form that created the preview.
Remember to add the short URL of this value to the @referers array!

MODULES DIRECTORY RELATIVE PATH $modules_path
The value for this variable is to be a relative path to the subdirectory containing the extension modules. The default is setup for the subdirectory of the cgi script dir.

DATABASE DIRECTORY RELATIVE PATH $ennydb_path
The value for this variable is to be the relative path to the subdirectory where data base output files will be created and saved to - if the data base module is enabled in any form.

BITS AND PIECES! DIRECTORY RELATIVE PATH $enymre_path - new v2.06
The value for this variable is to be the relative path to the subdirectory where the new mail replacement texts are to be stored. This directory will have other uses in the future!

SUCCESS PAGE (default only) HEADER / FOOTER $tbanna $bbanna
These variables contain the file names of files accessed for the default success page output. NOTE the comments in each file, and only replace the comments lines with your HTML code for either your own page header / footer, or perhaps even the code for banner adds. Both files can be left as is.

MAIL RECEIVER (your) ADDRESS $mymail
DEFAULT only: For this variable, you must enter the email address that is to receive the form submission. The default sample includes a forward slash before the @ character ( \@ ). If running this script with Perl version 5, omitting the forward slash will create a script crash. NOTE that the special 'mailto' hidden input option can be used to override this value (see names explained - above).

You can now add a Name after the address by dividing the address and name with a full colon. This option can also be applied to all recipient address files too! ie "wombat@gully.com:Bert"

"TOTALLED" VALUE PREFIX $total_prfx
v2.05 This value will appear as the prefix to a total value of specially marked input object values returned to the program (see above). The default is a dollar sign AND is enclosed with single quotes which must remain or a crash will occur. If preferred, removing the dollar sign will disable the prefix.

SENDERS PREVIEW PAGE - redundant... notice for upgrades.
This variable has been replaced by the new ( v2.05 ) "opts" switch /X/.

ADDRESS CONFIRMATION MAIL $thanks
Changed from version 2 onwards. This option has been removed from the config file as of version 2. Sending a confirmation e-mail to the visitor is now by default. However, it can be switched off with a new hidden tag that is also used to enable various 'module' options. To disable the confirmation email, add the following to the "opts" value:
<input type="hidden" name="opts" value="T">

FUTURE Module addition $theword
This variable is to be left as is for the first release of version 2. Later modules will use this as an access password.

COMPATABILITY VARIABLES
There is now a defined section in the config file enabling complete compatability with ListMerge v2.0+ and E-Lists - when E-Lists again becomes available. Those programs have a similar section allowing all mail list options to be fully compatible between each program. For an explanation of each read the "modread.htm " page in the first section - "MAIL LIST - Subscribe".

MENU


For INTERMEDIATE installation experience - Help / Advice information is available.
INSTALLING

INCLUDED or REQUIRED FILES
The Perl language allows the inclusion of extra files containing libraries of commonly accessed sub routines or common lists of script variables etc. The script ennyfrms.cgi "require"s several such files. One includes a variable used by the date/time routines and another contains script variables that you need to adjust before installation. Most of my scripts prepared and available for general use include the GMT reference variable in a separate file. If I need to change this common variable for daylight savings or domain moves etc, then I only have to change one file, not many.

THE PATH TO PERL
At the top of each perl script (and must remain as the first line) is a default path to the Perl program on your host server. This can vary slightly between UNIX servers. If you have problems running the scripts, check with your host support staff about the correct path described in this line. The default entry is "#!/usr/bin/perl" and another common variation is "#!/usr/local/bin/perl". In Perl scripts the hash sign "#" character comments out the code on a line starting with this character. Here it has a special meaning to Perl and MUST remain. Check with other installed scripts also if you do not know what this line should look like.

SCRIPT PERMISSIONS
For Unix installations the script must be given read and execute permissions (chmod 755 or r+x). The two require files have read and write permissions (chmod 766). The directory that the require files are placed in (sets) will also need read and write permissions.

IF ONLY chmod 777 WILL WORK
If all else is double checked and you cannot get the script to work, then try setting the chmod 766 settings to 777. There are no changes required in the scripts, but the cgi-bin sub directories and files within them are set to chmod 766 by default. Try a setting of directories to 777 first, then files to 777 as a last resort.

UP LOADING FILES (Posting)
CGI-BIN permissions are set by the server and no attempt should be made to change them. Should you have to use another directory, AND your server allows the execution of Perl CGI scripts in other directories, then that directory should be set with read and execute permissions - chmod 755 (r+x).

By far the biggest problems faced when installing scripts are firstly the file transport encoding used and secondly the permissions settings set for both files and new directories. Bitmap images must be sent to the server using the "Binary" protocol. Text files, ie html pages, CGI SCRIPTS and require files, MUST be sent in "ASCII" format. Failure to do this will result in a server failing to recognise and execute the scripts. Although often referred to as programs, scripts must be compiled before they do anything. As an example, files with the .EXE extension on programs that are installed on Wintel machines are pre-compiled binary executable programs. Perl scripts on the other hand are compiled in memory by Perl before they can be executed, every time they are called. The script (text) must be in ASCII text format for the interpreter to be able to read it parse the code.

REMEMBER: Up load scripts and other text files as "ASCII" files, images as "Binary".

SAMPLE FILES
There are sample pages included in the .zip file. Viewing the sample form html code in conjunction with the input options naming methods (above) will help you realise how easy it is to use this script with almost any mail-form you need to design and use.

inputerr.htm...sample view of visitor input errors
prog_err.htm....sample view of one of the various program errors
sampcode.htm....a "stripped" working sample form for this help page
sampfrm1.htm....a working sample form for the MODULES options help page
sampfrm2.htm....a "stripped" working sample form for the MODULES options help page
sampprv1.htm....a sample preview page for the basic ennyForm tags
sampprv2.htm....a sample preview page for the MODULE extensions ennyForm tags
sampthnx.htm....a sample of the default "Thank you / Success" page including MODULE options
.....others may be supplied as new options are added,

Calling the script
For each form you create, in the <form ...> tag include the path to the script ie:
<form method="POST" action="http://yourdom.ain/cgi-bin/ennyfrms.cgi">

So, assuming the default directory structure is used, you will up load into:

Directory:
cgi-bin (server)
ennyfrms.cgi (chmod 755)
cgi-bin/sets (chmod 766 or 777)
enyfrmset.pl, gmtset.pl (chmod 766)
cgi-bin/ennyform (chmod 766 or 777)
bban.pl, tban.pl (chmod 766)
ennycopy.pl, ennyquot.pl (chmod 766)
ennymail.pl, ennydb.pl (chmod 766)
ennyumail.pl, quotnmb.txt (chmod 766)
ennysend.pl, ennyprev.pl (chmod 766)
cgi-bin/ennymore (chmod 766 or 777)
yourmail text files if needed (chmod 766)
????/mailfrms (chmod 766 or 777)
cgi-bin/ennydb (chmod 766 or 777)

If you must use another directory for the ??.set files, you must also change the path to those files at the top of the code in ennyfrms.cgi TWICE for EACH.

#--- Alter these two paths only (twice each!), if needed! ------------#
      require "sets/enyfrmset.pl";
      require "sets/gmtset.pl";
#--- Do Not make any changes below this line. ----------#

The program CANNOT be run from a browser command line OR a remote copy of your pages -
THIS MEANS YOU TOO! - a security measure

MENU


UTILITIES

UTILITY testbin.cgi
I have created a simple utility script that can be placed in your cgi-bin and run from your browsers command line. This script will, in almost all cases, detect the Perl version you are using and report its findings. If it reports version 4 as the only default, then you must ask your Host Service for the correct path to Perl 5 (Always top and FIRST line in all scripts). E-Lists is a Perl 5 script for Unix servers.

The new version of tesbin.cgi attempts to ascertain server paths to all Perl versions and paths to Sendmail. Either or both of these may not be listed depending on server set-up. Testbin.cgi also now allows you to check your path to perl by attempting a mail out. To do this change in the code near the top the URL to the testbin.cgi program.

So!
Change the program URL in the code - only variable to change.
Place "testbin.cgi" in your cgi-bin directory and chmod 755 (7=r+w+x, 5=r+x).
Then run from a browser command line, ie http://www.yourdomain.path/cgi-bin/testbin.cgi

UTILITY makedir.cgi
I have created a simple utility script that can be placed in your cgi-bin and run from your browsers command line. If your server allows directory creation via cgi scripts, then this utility will attempt to create the default (recommended) directories and file names for you, and set the permissions. It is unprotected and there is no guarantee that it will work; try it at your own risk (disclaimer only). It has worked well on many sites.

Try installing and running this script first. It will report success or failure when creating the files/directories and prove the correctness of your Perl Path", plus indicate that the default relative paths will work OK. If the default urls/paths are not used, then you will have to change them first.

To use it, make sure the "Perl Path" at the top of the script is correct. NOTE: the default Dir/File permissions are set to 766. Change these values to 777 if your site so requires BEFORE running the script. If running the script is successful, you only have to FTP your supplied files over the new empty ones. (note: for security reasons, makedir does NOT prepare an empty file for the cgi scripts, you must upload them (as ascii) and set chmod 755 your self)

Once run successfully, delete the file immediately because it has no input protection and could be run again by some low-life wanting to cause mischief.

So!
Place "makedir.cgi" in your cgi-bin directory and chmod 755 (7=r+w+x, 5=r+x). Then run from a browser command line, ie: http://www.yourdomain.path/cgi-bin/makedir.cgi

Enjoy - & please let me know how you get on with this script, how/what server type it installed to.
      Ron

MENU