Basic PHP Form version 1.2

08/21/2005

First of all, thanks for trying out Basic PHP Form.  It would be cool to place a link back to  
http://www.mevin.com as an acknowledgement, but it's not required.

I'm not really a PHP programmer.  But fortunately PHP is not rocket science.  If you have a decent amount of cerebral activity going on, you can definitely learn to do some cool things with PHP.  I am a web designer who has a modicum of ability writing PHP.  I needed a script for a client that would email the results of a form.  There are plenty of pre-made scripts that can do that, but none (at least I couldn't find any) that had all server-side validation and with a confirmation page.  So I wrote this script, and here it is.  

The great thing about all server-side validation is that you don't have to worry about browser compatibility. That's a huge concern these days, because there are now at least 4 browsers you have to worry about.  In addition, most form to email scripts don't give the visitor the chance to review what they wrote, but this one does. (now optional)  I hope this program is useful. 

Instructions:

1. Unzip the package with an unzipping utility.  I like Winrar -http://www.rarlab.com (Actually, that's  
a pretty silly thing to say, since if you're reading this, you've already unziped the file.  But I  
digress)

2. If you're upgrading from version 1.0, you will have to replace all files ending with the .php extension.

3. Open the file config.php and edit the email address or addresses that will receive the form  
results. You can also edit the other variables if you want.

4. Upload all the php files and the css file to your server.  You should be able to upload them to any  directory. 

5. On some servers you will have to chmod the php files (change file permissions) to 0755 in order to  execute the files.  Most modern FTP clients can do this for you, but if you need help or want to know  more about how chmod works, go to: http://catcode.com/teachmod/  

6. Now run the form.php page on your server and try it out.

7. If there's a field you don't need, do the following:

   A. Turn off the validation in the config.php file. (e.g. phone_on="0")
   B. Remove the table row that contains the unwanted field from the form.php file.
   C. If you're using the confirmation page, remove the table row from the confirm table section of the confirm.php file; line 135.


8. Thats pretty much it.  I have included header and footer files that you can modify to match your sites design.  You can either edit the files directly, or point the include statements to your own template files.  I have tried not to style the files too much, save for a tiny bit of css. 

The php files are commented in all the key areas.  If it doesn't work for you and you've followed all the directions and haven't edited anything but the config.php or the form.php files, email me at: info@mevin.com and I will try to help you, time permitting.  If you require modifications beyond the basic functionality, I am happy to help, but I charge $50.00/Hr.

You're ready for a break.  I suggest a cup of coffee and a Twix bar.

Peace and stuff,

Mark 
info@mevin.com
http://www.mevin.com
