title: PHP email contact form, dropdown box for subject not working
body: <p>I have a contact form that mails the user input values to an email address. It works fine, it sends with all the information except for the subject, which I have presented as a drop down box with a few choices. I want the selected option set as the email subject.</p>
  
  <pre><code>&lt;select name="subject"&gt;
    &lt;option value="1" selected&gt;1&lt;/option&gt;
    &lt;option value="2"&gt;2&lt;/option&gt;
    &lt;option value="3"&gt;3&lt;/option&gt;
    &lt;option value="4"&gt;4&lt;/option&gt;
    &lt;option value="5"&gt;5&lt;/option&gt;
  &lt;/select&gt;
  
  
  &lt;?php
    $email      = $_POST['email'];
    $message    = $_POST['message'];
    $name       = $_POST['name'];
    $subject    = $_POST['subject'];
    $phone      = $_POST['phone'];
    $to         = 'emailaddress.co.uk';
    $from       = $email;
    $header     = "From:" . $from;
    $msgsubject = "$subject message from $name";
    $commessage = "Name: $name
  
    Email: $email
  
    Phone Number: $phone
  
    Subject: $subject
  
    Message: $message";
  
    mail($to, $msgsubject, $commessage, $header);
  ?&gt;
  </code></pre>