title: <Select> keeps reseting on submit
body: <p>I am trying to make an contact form for my website and I am using the following code. I don't know why the selector keeps reseting when the text fields don't.</p>
  
  <p>Anyone know a soultion for this? Or what I am doing wrong.</p>
  
  <p>( It resets when the error check is done, and fails )</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
  session_start();
  $php_self = $_SERVER['PHP_SELF'];
  
  // on submit
  if( isset($_POST[name]) &amp;&amp; isset($_POST[email]) &amp;&amp; isset($_POST[message]) &amp;&amp; isset($_POST[captcha]) ){
      $name = $_POST[name];
      $email = $_POST[email];
   $telefon = $_POST[telefon];
   $option = $_POST[option];
      $message = $_POST[message];
      $captcha = $_POST[captcha];
       
      $error = 0;
      // name
      if( $name == "" ){ $error ++; $error_name = "class='error'"; }
      // email
      if( $email == "" ){ $error ++; $error_email = "class='error'"; }
      // message
      if( $message == "" ){ $error ++; $error_message = "class='error'"; }
      // captcha
      if( $captcha == "" || $captcha != $_SESSION[captcha]){ $error ++; $error_captcha = "class='error'"; }
   
      // no error, send email
      if( $error == 0){               
                           
          // your email address
          $address = "surrealcmstest@outlook.com";
           
          // email subject
          $subject = "x , Nytt Meddelande \r\n";
          // email content
          $content = "Namn: $name \r\nE-postadress: $email \r\nTelefon Nr: $telefon \r\nKontakta mig via: $option \r\nMeddelande: $message";
          // html email
          $email_content = "".$subject."";
          $email_content .= "";
          $email_content .= $content;
          $email_content .= "";                     
                   
  
          // send email
          mail($address, $subject, $email_content, "From: $email\r\nReply-To: $email\r\nReturn-Path: $email\r\n");         
           
          // reset variables
          $name = ""; $email = ""; $message = "";
          $mail_sent = 1;                                                             
      }
  }
   
  // captcha
  $num = rand(1, 20);
  $num2 = rand(1, 9);     
  $verif = $num . " + " . $num2;
  $_SESSION[captcha] = $num + $num2;      
   
  if( $mail_sent == 1 ){
      echo "&lt;div class=","sucess","&gt;Ditt meddelande har skickats, vi återkommer så fort som möjligt.&lt;/div&gt;";
  } else {
      echo "
      &lt;form action='".$php_self."' method='post'&gt;
   &lt;p&gt;&lt;span class='required'&gt;* är obligatoriska fält.&lt;/span&gt;&lt;/p&gt;
      &lt;p&gt;&lt;strong&gt;Namn:&lt;/strong&gt; &lt;span class='required'&gt;*&lt;/span&gt;&lt;/p&gt;
      &lt;input type='text' ".$error_name." name='name' value='".$name."'&gt;
      &lt;p&gt;&lt;strong&gt;E-postadress:&lt;/strong&gt; &lt;span class='required'&gt;*&lt;/span&gt;&lt;/p&gt;
      &lt;input type='email' ".$error_email." name='email' value='".$email."'&gt;
   &lt;p&gt;&lt;strong&gt;Telefon Nr:&lt;/strong&gt;&lt;/p&gt;
      &lt;input type='telefon' name='telefon' value='".$telefon."'&gt;
   &lt;p&gt;&lt;strong&gt;Kontakta mig via:&lt;/strong&gt;&lt;/p&gt;
   &lt;select name='option'&gt;
   &lt;option value='-'&gt;-&lt;/option&gt;
   &lt;option value='Telefon'&gt;Telefon&lt;/option&gt;
   &lt;option value='E-post'&gt;E-post&lt;/option&gt;
   &lt;/select&gt;
      &lt;p&gt;&lt;strong&gt;Meddelande:&lt;/strong&gt; &lt;span class='required'&gt;*&lt;/span&gt;&lt;/p&gt;
      &lt;textarea ".$error_message." name='message'&gt;".$message."&lt;/textarea&gt;
      &lt;p&gt;&lt;strong&gt;Hur mycket är ".$verif."?&lt;/strong&gt; &lt;span class='required'&gt;*&lt;/span&gt;&lt;/p&gt;            
      &lt;input type='text' ".$error_captcha." name='captcha' value=''&gt;&lt;br/&gt;
      &lt;button&gt;Skicka&lt;/button&gt;
      &lt;/form&gt;";
  }
  ?&gt;</code></pre>
  </div>
  </div>
  </p>