Click to return...
writedocMail
(click to download)

Downloadable PHP-based Form Processor with required field checking and input validation. View the ReadMe and the sample form, error, & success pages.

Description

The writedocMail.php script provides a basic PHP-based form processor with checking for required fields and user input validation. It is very simple to configure if the forms supplied are used, all you need to do is add the email address that you want the feedback results forwarded to. Since this is a PHP script, which can't be viewed by web browsers, with your email address inside, the script offers some privacy and security because spam programs can't automatically retrieve your email and add it to their spam lists. Instructions are included for handling forms with more fields than those included in the sample form.

The script is offered as is and no support is offered. For help in using PHP, see http://www.php.net/, http://www.hotscripts.com/, http://www.devscripts.com/, or http://www.phpfreaks.com/

Files provided...
writedocMail.php: is the PHP script, stored in the script folder
feedback.htm: sample feedback form
formSuccess.htm: sample successful form processing page in responses folder
formError1.htm: sample form processing error page in responses folder
formError2.htm: sample form processing error page in responses folder
formError3.htm: sample form processing error page in responses folder
formError4.htm: sample form processing error page in responses folder
images folder: contains the images used in the sample pages

Requirements...
PHP must be installed on your web server with register_globals enabled

Basic instructions...
After decompressing the downloaded writedocMail.zip file, edit the writedocMail.php file and change $mailTo to specify your email address. If you plan to use the sample pages provided, simply move the writedocMail folder to your server and call the feedback.htm file from any web page.

Detailed instructions...

  1. Download and decompress the writedocMail.zip file
  2. Change the $mailTo text, within the writedocMail.php file, to your email address
    Jump to Step10, if you are using the sample form (feedback.htm) and files
  3. Create your Form with link to this file as the Form's POST Action
  4. Change $msgSubject text to what you want
  5. Change $formSuccess to location of your successful form submission page
  6. Change/Add $formError to location of your form processing error pages
  7. Add a variable for all fields in your form
  8. Add case statements for every user-input field in your form
  9. Add your form field-names and associated $variable-name to msgBody
  10. Save the writedocMail.php file in the script folder within the writedocMail folder
  11. Move the writedocMail folder to your server and call your form from any web page