Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Simple Contact Form Dropdown Menu Help

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #39780
    TitanVex
    Member

    I am trying to get a simple contact form to work so I get an email when the form is submitted. It works great, by the way. However, I can’t get it to work with my dropdown menu. Everything else works, so I am not sure why the dropdown doesn’t work. Here is the code:
    (pretend I put the rest of the form code before and after the dropdown code)

    and the php:

    
    
    $EmailFrom = Trim(stripslashes($_POST)); ;
    $EmailTo = "[email protected]";
    $Subject = "Incoming Inquiry from titanvex.com";
    $FirstName = Trim(stripslashes($_POST));
    $State = Trim(stripslashes($_POST));
    $Email = Trim(stripslashes($_POST));
    $Message = Trim(stripslashes($_POST));

    // validation
    $validationOK=true;
    if (!$validationOK) {
    print "";
    exit;
    }

    // prepare email body text
    $Body = "";
    $Body .= "Full Name: ";
    $Body .= $FirstName;
    $Body .= "n";
    $Body .= "Email: ";
    $Body .= $Email;
    $Body .= "n";
    $Body .= "Project Type: ";
    $Body .= $State;
    $Body .= "n";
    $Body .= "Message: ";
    $Body .= $Message;
    $Body .= "n";

    // send email


    // redirect to success page
    if (mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>")){
    print "";
    }
    else{
    print "";
    }
    ?>

    Any help would be greatly appreciated on this problem. When I get the email, everything is filled in, except for the part where I am trying to get 'State'. Thank you very much in advanced!

    #109791
    TitanVex
    Member

    Perfect. Works great. Thank you very much!

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘Back End’ is closed to new topics and replies.