title: Send a Select Form via PHP to Email
body: <p>been having a really frustrating rough time with a piece of code. Everything is working fantastic EXCEPT for the selector code! It won't post to the email and just shows up blank! <a href="http://brandoncamerer.com/africa/later.php" rel="nofollow noreferrer">http://brandoncamerer.com/africa/later.php</a></p>
  
  <p>HTML:
      </p>
  
  <pre><code>&lt;input type="email" class="form-control" placeholder="Your Email *" id="email" required="" data-validation-required-message="Please enter your email address."&gt;
  
  &lt;input type="text" class="form-control" placeholder="Your Phone *" id="phone" required="" data-validation-required-message="Please enter your phone number."&gt;
  
  &lt;textarea class="form-control" placeholder="Your Message *" id="message"     required="" data-validation-required-message="Please enter a message."&gt;&lt;/textarea&gt;
  
  &lt;select name="country" style="width:100%;" class="selectpicker"&gt;
  &lt;option&gt;Choose a camp for me&lt;/option&gt;  
  &lt;optgroup label="Cote D'Ivoire"&gt;
  &lt;option&gt;Cote D'Ivoire Camps - Mar 27-29&lt;/option&gt;  
  &lt;/optgroup&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>PHP: </p>
  
  <pre><code>if(empty($_POST['name'])        ||
  empty($_POST['email'])      ||
  empty($_POST['phone'])      ||
  empty($_POST['message'])    ||
  !filter_var($_POST['email'],FILTER_VALIDATE_EMAIL))
  {
  echo "No arguments Provided!";
  return false;
  }
  
  $name = $_POST['name'];
  $email_address = $_POST['email'];
  $phone = $_POST['phone'];
  $message = $_POST['message'];
  $country = $_POST['country'];
  
  // Create the email and send the message
  $to = 'brandon.camerer@gmail.com'; // Add your email address inbetween the ''     replacing yourname@yourdomain.com - This is where the form will send a message to.
  $email_subject = "Website Contact Form:  $name";
  $email_body = "You have received a new message from your website contact     form.\n\n"."Here are the details:\n\nName: $name\n\nEmail:       $email_address\n\nPhone: $phone\n\nMessage:\n$message\n\nCamp: $country";
  $headers = "From: noreply@yourdomain.com\n"; // This is the email address the     generated message will be from. We recommend using something like  noreply@yourdomain.com.
  $headers .= "Reply-To: $email_address"; 
  mail($to,$email_subject,$email_body,$headers);
  return true;    
  </code></pre>
  
  <p>Here is an example of the output: <img src="https://i.stack.imgur.com/AGGM4.png" alt="enter image description here">        </p>