PHPeasy-form: a PHP mail handler

PHPeasy-form was developed to aid website owners in receiving feedback through website forms. This form handler will check for required fields, send the feedback to an email address you specify and will also write the results to a file on your website. This script is distributed as freeware under the GPL. It installs in minutes and can be easily configured. Complete instructions are included in the readme file.

NOTE: This script is not intended for use other than to collect legitimate contact from website visitors. Use for any other purpose is strictly prohibited.

Download

Click to download

Release History

Version 3.0 – March 17, 2006

  • added check for required fields

Version 2.0 -May 16, 2005

  • added option to write results to file

Version 1.0 – October 2, 2004

  • initial release

Support

Use the comments box below to leave feedback, post a question or ask for assistance.

39 comments on “PHPeasy-form: a PHP mail handler

  1. Hi I am having problems with the required field settings.

    I seem to have the script set-up correctly, but no matter what I do the form keeps coming back saying that you need to fill in the fields despite the fact that I have definately filled in the name, address, email address and phone number fields.

    Any help would be greatly appreciated!

    Daniel

  2. Excellent script! How can i change the redirect behaviours? I want to redirect to other pages after the form is send or when there is an error. Also, how can i make this form understand greek characters? The forms is submitted but all greek characters look like chinese!

  3. Hello Jodi,

    I currently use the phpeasy form to create forms my site. i have created a contact page on my site, that once submitted it responds with the following:

    Contact Us

    All fields are required. Please check your information and try again.
    ‘; $display .= ‘

    Go back
    ‘; } else{ $name = $_POST['name']; $company = $_POST['company']; $email = $_POST['email']; $phone = $_POST['phone']; $address = $_POST['address']; $conemail = $_POST['conemail']; $conphone = $_POST['conphone']; $calltime = $_POST['calltime']; $faccom = $_POST['faccom']; $facres = $_POST['facres']; $comments = $_POST['comments']; // send form results through email $recipient = “jimw@stormprotx.com”; $subject = “Request from website”; $forminfo = ( “Name: ” . $name . “r” . “Company: ” . $company . “r” . “Email: ” . $email . “r” . “Phone: ” . $phone . “r” . “Address: ” . $address . “r” . “Preferred Contact: ” . $conemail . “r” . $conphone . “r” . “Best time to call: ” . $calltime . “r” . “Facility Type: ” . $faccom . “r” . $facres . “r” . “Needs: ” . $comments . “rn” . date(“M-d-Y”) . “rnn” ); $formsend = mail(“$recipient”, “$subject”, “$forminfo”, “From: $emailrnReply-to:$emailrn”); $display .= ‘

    Thank you. You have successfully submitted the following information:
    ‘; $display .= nl2br($forminfo); } ?> .

    Does this seem to be possible coding issue or could it be the fact that I am on a windows server and the software works better on unix servers?

  4. Al, I’m having the same “all fields required” issue as other folks. What did you do to make yours work? And suggestions would be a huge help.

  5. I am getting this message “All fields are required. Please check your information and try again.”

    Uploaded all files, CHMOD formsend.php to 755 and still doesnt work?? (No change was made to the file)

  6. I figured out the problem…please disregard my previous post. I like the script. Thanks for making it freely available.

    Al

  7. I am getting the following error:
    All fields are required. Please check your information and try again.

    Go back

    PHPeasy-form written by SunFrogServices.com

    I have checked all the fields in the php form and on my web page. All match. How do I fix this problem?

    Thanks!
    Al

  8. Hi!
    I have the same problem as Bernie and Aurora…
    Even if all fields are filled it produces that error.
    I know this script is old, but maybe Jodi is still looking at these comments?
    Thanks! :)

  9. I have been using the script succesfully for a number of years but my WebHost decided to change to qmail and now i get an error everytime i post. Seems there is a LF being created during the Post. Anyone managed to get round this?

    Error I get is below.

    Warning: mail(): SMTP server response: 451 See http://pobox.com/~djb/docs/smtplf.html. in *********\formsend.php on line 71

  10. I’m having the same problem Bernie posted about on November 2007… was that issue every figured out anyone? Anyone?

    Again, it keeps giving me the page that says to fill out all fields… All fields ARE filled out, i even just used the script straight from the download, no changes, server DOES support PHP obviously… set file permissions to 755… Still doesn’t work.

    Any help would be greatly appreciated.

  11. Been using your script for about a year now, but the spammers have finally found me and I am getting about 10 spam messages a day through my website (I think it’s from one outfit). How do they do that?

  12. Hi Jodi;

    Great Script! I just couldn’t remember from when i first used it if i needed “sendmail” running on a hosting server in order for me to recieve the email or any pre-requisites on the hosting server in order for me to use PhpEasyForm .. could you let me know via email please and thank you :o )

  13. I really think your script is good! Hope to have it working on my site soon.
    I tried the script but when I tested it, it kept on saying that all fields are required. I checked to make sure that I didn’t miss a field, and I didn’t. I even tried the unedited form and script (feedback.htm and formsend.php) and it gave me the same prob. What could be the problem?

  14. Hi. I have a question about your script, the PhPeasy form script. I downloaded the script and finally found time to make it work. Thing is although the script worked well the confirmation message that appears after a message is sent using the form uses a white page background and my site’s color contrast deeply with it giving a bad impression.

    Just wanted to know if there is a way I could customize the color of the confirmation notification that appears after a message is sent using the form.

    My other question has to do with redirecting the page back to my site after the message has been sent. After the notification stating the message was successfully sent, the page does not move or redirect back to the site. Do you think there’s anything I can do to redirect the sender of a message back to my site?. Thanks a lot for helping.

  15. The static line doesn’t seem to be working for me. Below is the code – the Contact Info won’t show on the results screen or on the email back to me. Thanks.
    $forminfo =
    (
    “Contact info: \r”.
    $_POST['name'] . “\r” .
    $_POST['address'] . “\r” .
    $_POST['city'] . “\r” .
    $_POST['pcode'] . “\r” .
    $_POST['comment'] . “\r\n” .
    date(“M-d-Y”) . “\r\n\n”
    );

  16. To upload files, you’ll need to add this to your form tag: enctype=”multipart/form-data”. You will also need to add code to the PHP page to attach the file to the email. A tutorial on attaching files to email can be found at Sitepoint.

  17. What about having an upload file (picture)? I tried just adding it but I think I am doing something wrong as just get weird text and no image attachment with the email. Other super easy to use!!!!

  18. Hi Steve. You can add a static line to the forminfo field to separate the categories. Something along these lines (using “Contact info” and “Other” as category headings):

    $forminfo =
    (
    “Contact info: \r”.
    $name . “\r” .
    $email . “\r” .
    “Other: \r”.
    $comments . “\r\n” .
    date(“M-d-Y”) . “\r\n\n”
    );

  19. First I would like to say this is very simple to use and very helpful.

    Thank you

    Just a quick question is there a way in the php page to divide categories of a submitted form, because Right now I have 19 fields I need to list then in three categories when the email form is submitted.

  20. Jodi,

    one small request on this form which I know has become widely used and is extremely useful to we non-php guru’s: can you possibly include a <br> tag at the end of each $_POST command? Basically, it would be really nice to have a line break between posted data when you have fields which are being filled with paragraphs.

  21. To add an extra line break in your results, add \r at the end of the line. For example – if you wanted to have a blank line following the name field, the line would look like this:

    $_POST['name'] . "\r\r" .

    (note the second \r)

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>