PHP-Freebies.com - PF Recommendation Script

php-freebies.com

PF Recommend

Requirements:

  • PHP 4.3+
  • Apache webserver

Features/Benefits:

  • Database not needed
  • Page containing the form doesn't need to have a .php extension
  • Installation is just a matter of uploading 4 files to your server
  • The email uses a text file(.txt) as a template, so it's very easy to change the outgoing messages
  • Supports variable number of emails

Installation:

  1. Download the zip file and extract
  2. The extraction will result in 3 php files, one example html file, one email template text file and a readme file
    • config.php
    • functions.php
    • process.php
    • email_template.txt
    • example.html
    • readme.txt
  3. Open config.php with your text editor of choice and edit the necessary fields following the instructions there
  4. Upload the 3 php files to your server and thee email template text file, they must all be in the same directory
  5. Edit your form's ACTION attribute to point to the process.php file you just uploaded, for example:
    • <form action="process.php" method="post" />
  6. Your FORM should have a POST method (GET will not work)
  7. Add a hidden input field to your form:
    • <input type="hidden" name="submit_check" value="1" />
  8. The sender name form field should have a name attribute with value = "sender_name", for example:
    • <input type="text" name="sender_name" />
  9. The sender email form field should have a name attribute with value = "sender_email", for example:
    • <input type="text" name="sender_email" />
  10. Each friend name field should have a name attribute with value = "friend_name[]", for example:
    • <input type="text" name="friend_name[]" /> notice the brackets after the field name
  11. Each friend email field should have a name attribute with value = "friend_email[]", for example:
    • <input type="text" name="friend_email[]" /> notice the brackets after the field name
  12. That's it!

Editing the email template file (email_template.txt):

The file email_template.txt is the email template that will be used with your form. This file must be named email_template.txt and must be uploaded to the same directory of the php files. This template also has other requirements, please note the pattern of this file:

From Name: xxxxxxxxxxxx From Email: xxxxxxxxxxxxx Subject: xxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

You can edit all parts represented above with x's; the remaining text must be as shown above, that is, you cannot change the "From Name:" text, "From Email:" text and "Subject:" text, they must be exactly as they currently are; after the "Subject:" text, you need a blank line to separate the body of the message.

This template file also works with wildcards:

  1. %friend_name% will be replaced with the friend name that the sender entered in your form
  2. %friend_email% will be replaced with the friend email that the sender entered in your form
  3. %sender_name% will be replaced with the sender name that the sender entered in your form
  4. %sender_email% will be replaced with the sender email that the sender entered in your form

For example, if the sender entered "John" as his name in the form, wherever you write %sender_name% in the email template will be replaced with "John" in the outgoing emails.

Download:

Soccer  |  No Win No Fee  |  Hotels in Orlando Florida  |  Cash Advance  |  Sasha Medvedeva  |  Yoga   |  Musica para casamento