BigNoseBird.Com's - - - - - All Purpose Form Handler FOR UNIX & WINDOWS NOW ON VERSION 4.1 ------------------ Updated November 2, 2002 Proper validation of four character TLDs such as .name and .info now allowed. Updated January 31, 2000 Improved security features. Arbitrary file requests are prevented by the script appending a unique extension to each file type. File names and e-mail addresses are are checked for possible exploit attempts. Multiple recipients and cc's are now supported. Thank you page now shows submitted information. ABOUT THE NEW FILENAME SYSTEM: In order to prevent people from being able to overwrite or read from files on your server, you MUST set up your file names in the following way. Each item such as automessage, is given an extension automatically by the script. Do not include the extension in the VALUE part of the HIDDEN INPUT tag. This is how the exploit attempts are blocked. The list below shows the extension associated with each file type. the file MUST be named mymessage.baut when you save it on the server. the script will create form1.bout the script will create form1.bcnt the script will create form1.bemf 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(s) and CC as well. 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 READY 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.baut 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 some 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/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: