PHP EMAIL FORM

I’ve been trying to data sent to me via PHP. I have an html code that is legit but the php file that I am sending it through isn’t fully functional. First, it takes forever to send to my email. Second, it doesn’t send the selection of the multiple select field in in my html form. Can someone take a look at my code and HELP!

MY PHP FILE:

<?php $EmailFrom = "[email protected]"; $EmailTo = "[email protected]"; $Subject = "NEW JBH ORDER"; $Name = Trim(stripslashes($_POST['jbh'])); $Email = Trim(stripslashes($_POST['email'])); $Guests = Trim(stripslashes($_POST['shirts'])); $Body = ""; $Body .= "JBH: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email: "; $Body .= $Email; $Body .= "\n"; $Body .= "Shirt Style: "; $Body .= $Guests; $Body .= "\n"; $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); if($success) {print ( "Location: http://www.heyjbh.com/storefront/success.php" );} else {print "We encountered an error sending your order, please contact [email protected] directly"; } ?>

MY HTML CODE:

  • Enter your JBH

    Max. 140 characters

  • Email
  • Shirt Style
    Men's Dark T-Shirt Men's Light T-Shirt Men's Ringer T Women's Dark T-Shirt Women's Light T-Shirt Women's Ringer T
  • Sponsor our Newsletter | Privacy Policy | Terms of Service