HTML code for Contact Form

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • Patti Johnson
    Sergeant Major

    • Jul 2005
    • 95

    HTML code for Contact Form

    If one of you great html people out there can help me with this, I'll be very happy. Here's my form www.winetastingatyourhome.com/contact.html and the following is the code on my contact.php file on the server. Obviously the code does not include all aspects of the form, so when I receive an email, it does not include all the fields that are on the form itself. Can someone help me with changing this code so that the form will relay all info correctly? The submit button works fine.

    <HTML>
    <HEAD>
    <TITLE>Thank you.</TITLE>
    </HEAD>
    <BODY>
    <H2>Thank you. We will contact you shortly.</H2>
    <?PHP
    $email = $HTTP_POST_VARS[email];
    $mailto = "contact@winetastingatyourhome.com";
    $mailsubj = "contact form";
    $mailhead = "From: $email\n";
    reset ($HTTP_POST_VARS);

    $mailbody = "Values submitted from web site form:\n";

    while (list ($key, $val) = each ($HTTP_POST_VARS))
    {
    $mailbody .= "$key : $val\n";
    }
    mail($mailto, $mailsubj, $mailbody, $mailhead);
    ?>
    </BODY>
    </HEAD>
  • fun-colorado-family-hikes
    Corporal

    • Aug 2005
    • 16

    #2
    Did you name all the fields on the form?


    I know whan I don't name the fields it only returns the first data value entered because the rest of the fields have the same name.

    Comment

    • Patti Johnson
      Sergeant Major

      • Jul 2005
      • 95

      #3
      Yes, I think I got it... thanks.



      Originally posted by fun-colorado-family-hikes
      Did you name all the fields on the form?


      I know whan I don't name the fields it only returns the first data value entered because the rest of the fields have the same name.

      Comment

      Working...
      X