BigNoseBird.Com's - - - - - All Purpose Form Handler FOR UNIX & WINDOWS NOW ON VERSION 3.0! -------------------- Updated 04-27-99 * Well some people don't have access to SMTP, so the Script now supports SMTP and SENDMAIL. Assign a value to one or the other, but not both. Try SMTP first. Updated 04-24-99: * Due to popular demand, sendmail is no longer used. The Sockets method of attaching directly to an SMTP server is now used. This should also provide a bit more speed to the script. Updated 12-25-98: * Replaced e-mail restriction($SECURE_NAME) with referring URL validation. okaydomains an an array you can list valid calling locations in. Updated 08-20-98: * Added file locking on log file Updated 08-17-98: * E-mail format validation on submit_by (sender) NEW IN VERSION 2.1! ------------------- * cc_to form variable that allows you to specify a second (Cc) recipient for the form's data. If used, must be used in conjuction with submit_to. NEW IN VERSION 2.0! ------------------- * emailfile form variable to allow you to capture only the email address to file. * countfile form variable to allow you to indicated a unique incrementing counter for your mail forms. If you use this feature, you can access the number in the script as either $newnum or $fields{'counter'} HINTS: if you add counter to the data_order list, it will appear in your letter. ------------------- This program, bnbform.cgi is designed to allow you to quickly implement your HTML based forms. The program is configured by information you provide in the form itself, so you can get the script to handle your data in a variety of ways without changing your scripts. Without writing one line of perl code, you can do the following (in any combination!): 1.) Submit E-mail to a specified person. 2.) Send the data to a file for easy import into a database program. 3.) Automatically send a resonse to the submitter, with a text file to contain your message. 4.) Define the order the data is printed. 5.) Enforce completion of specified fields. 6.) Define a page for a "Thank you" or an "Oops!" message after the form is submitted. I. GETTING READ TO INSTALL ---------------------------- Included in this zip or tar file you will find the following files: FILE NAME DESCRIPTION --------- ----------- README.TXT The file you are reading! bnbform.cgi The script bnbform.html A sample form mymessage.txt A sample autoreponse message oops.html A sample HTML page for incomplete data thanks.html A sample HTML page for saying thanks! NOTE: PLEASE READ THE Q&A BELOW, IT CONTAINS SOME USEFUL SETUP INFORMATION! In order to install the script, you should only have to find out the answers to the following questions: Q: Where is perl on my server? A: On most systems it is /usr/local/bin/perl but it may be in /usr/bin/perl or /usr/sbin/perl. The very first line of the script says, #!/usr/local/bin/perl This MUST be the first line of the script with nothing including blank lines above it. If your "perl" is not there, edit this line so that it is correct for your system. Q: What is an SMTP server? A: This is the computer that handles your domain's e-mail, but you can also use your ISP's mail server as well (usually). On most systems, the "localhost" will work just fine. Q: Where is my cgi-bin directory? A: This varies. Please check with your system administrator or system FAQ if you do not know this. Q: How do I call a cgi-bin script from a form? A: On my system, this does the trick: