Results 1 to 5 of 5

Thread: Emails From Contact Form
      
   

  1. #1
    lemmondr is offline Second Lieutenant
    Join Date
    Sep 2007
    Posts
    104

    Default Emails From Contact Form

    Hi Gang!!

    I'm getting emails from my Contact Form like this:

    Values submitted from web site form :



    --
    No virus found in this incoming message.
    Checked by AVG Free Edition.
    Version: 7.5.503 / Virus Database: 269.15.33/1133 - Release Date: 11/15/2007 8:57 PM


    Is this just members clicking submit to check my Thank Page or is there
    something wrong with my Contact Form??

    Thanks

    Dan.



  2. #2
    Marincky's Avatar
    Marincky is offline General
    Join Date
    Apr 2006
    Location
    Warwickshire, UK
    Posts
    4,564

    Default Re: Emails From Contact Form

    George will explain this better than me but it has something to do with hits to your 'thank you' page that don't come through people visiting or filling in your form. You can test this by tyoing in your url to your thank you page then I bet you get a blank email as you did above. George told me that even a SE robot hitting on that page could set it off.

    He did do something for me though that seemed to calm it down, so maybe he will come along and help you when he sees this post.
    Don't aim for success if you want it; just do what you love and believe in, and it will come naturally.

  3. #3
    Andy128's Avatar
    Andy128 is offline Major General
    Join Date
    Dec 2005
    Location
    Michigan
    Posts
    2,322

    Default Re: Emails From Contact Form

    Dan-
    Please post the php code that you are currently using and we will be able to give you some additional code to keep this from happening.

    Andy
    PHP- is a blast!

  4. #4
    lemmondr is offline Second Lieutenant
    Join Date
    Sep 2007
    Posts
    104

    Default Re: Emails From Contact Form

    Andy,

    Here is the PHP code I'm currently using. My thankyou page comes up. My test emails work for me....but I keep getting these emails like the one
    I pasted above with no data from the form...I thinking people are just
    clicking the SUBMIT button to see if my Thank you page is working....not sure though...any advice is appreicated.

    <?PHP
    $mailto = "administrator@jaxplus.net";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Jaxplus Contact request";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>


    Thanks!!!

    Dan

  5. #5
    Watdaflip's Avatar
    Watdaflip is offline Major General
    Join Date
    Sep 2005
    Location
    Cincinnati, Ohio
    Posts
    2,119

    Default Re: Emails From Contact Form

    Change it to something like

    <?PHP
    if(isset($_POST['submit']))
    {
    $mailto = "administrator@jaxplus.net";
    $email = $HTTP_POST_VARS['email'];
    if ($email == "") {
    $email = $mailto;
    }
    $mailsubj = "Jaxplus Contact request";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);
    $mailbody = "Values submitted from web site form :\n";
    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    if ($key!="submit")
    {
    $mailbody .= "$key : $val\n";
    }
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    }
    ?>

    and then make sure that the "name" of your submit button is called "submit" (if might already be, just make sure it is)

    That should fix it

    Register/Login Script
    Do you use a Password Protected Directory? Need a way to allow users to make their own account, try my .htaccess Login Script

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49