Jump to content

rx3mer

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by rx3mer

  1. Hey, I haven't done the checks for each input but the script should work. PHP file <?php $name = $_POST['name']; $email = $_POST['email']; $phone = $_POST['phone']; $selection = $_POST['selection']; $comment = $_POST['comment']; $to = "[email protected]"; $subject="XXX Web Inquiry"; $message=""; $message.= "Hello,<br><br>\n"; $message.="<b>Name:</b> ".$name.".<br><br>\n"; $message.="<b>Email:</b> ".$email."<br><br>\n"; $message.="<b>Phone:</b> ".$phone."<br><br>\n"; $message.="<b>Selection:</b> ".$selection."<br><br>\n"; $message.="<b>Comment:</b> ".$comment."<br><br>\n"; $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=iso-8859-1\r\n"; $headers .= "From:".$name."<".$email.">\r\n"; $headers .= "Reply-To:".$name."<".$email.">\r\n"; $headers .= "X-Mailer: PHP/" . phpversion() . "\r\n"; $headers .= "X-Priority: 1"; mail($to,$subject,$message,$headers); if (isset($HTTP_REFERER)) { echo "Your email has been send! | <a href='$HTTP_REFERER'>back</a>"; } else { echo " Your email has been send! | <a href='javascript:history.back()'>back</a>"; } ?> You don't need to change anything in the html file.
  2. PHP problems...

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.