Announcement

Collapse
No announcement yet.

Emails From Contact Form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment


    • #3
      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!

      Comment


      • #4
        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

        Comment


        • #5
          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

          Comment

          Working...
          X