Arrays in mail with <select multiple>

  • Thread starter Thread starter Anonymous
  • Start date Start date
A

Anonymous

Guest
Hi! cad, I will need to see your html page all so.

Here's what you should do.

Code:
<?php

$name = $_POST['name'];
$company = $_POST['company'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$inquiry = $_POST['inquiry'];



$to  = "myemail";

    /* subject */
$subject = "Contact Form";


    /* message */
$message = <<< heredoc
<strong>Contact Form</strong><br>
<strong>Name:</strong>        $name<br>
<strong>Company:</strong>     $company<br>
<strong>Phone:</strong>       $phone<br>
<strong>Email:</strong>         $email<br>
heredoc;
    
foreach ($inquiry as $i) { 
echo "<strong>Inquiry:</strong>     $i<br>";
}
        
$headers = "MIME-Version: 1.0rn";
$headers .= "Content-type: text/html; charset=iso-8859-1";
/* additional headers */
$headers .= "To: Me <myemail>";
$headers .= "From: Contact Form <contactform@myemail>";

mail($to, $subject, $message, $headers);

?>
 
Back
Top