title: How to carry form data from a select field to another form (having the same elements) in a select field?
body: <p>Okay, I know that's a bit too premature but I didn't get any satisfactory answers wherever I tried to search. What I want to do is basically, collect form data from the users, validate(PHP) them, assuming they have JavaScript disabled I want to show errors in the next page with PHP. And I also want to show them the same form that they worked on earlier. The difference is that there would be error messages and the form fields would be pre-filled with the data they entered. I have succeeded in the text fields and radio fields. But it's proving difficult for me to show them the select field input. . Help is very much appreciated and thanks in advance. 
  this is 1st  form's select fields:</p>
  
  <pre><code>        &lt;select name="month" id="month"&gt;
    &lt;option value="-1"&gt; Month: &lt;/option&gt;
    &lt;option value="1"&gt;Jan&lt;/option&gt;
    &lt;option value="2"&gt;Feb&lt;/option&gt;
    &lt;option value="3"&gt;Mar&lt;/option&gt;
    &lt;option value="4"&gt;Apr&lt;/option&gt;
    &lt;option value="5"&gt;May&lt;/option&gt;
    &lt;option value="6"&gt;Jun&lt;/option&gt;
    &lt;option value="7"&gt;Jul&lt;/option&gt;
    &lt;option value="8"&gt;Aug&lt;/option&gt;
    &lt;option value="9"&gt;Sep&lt;/option&gt;
    &lt;option value="10"&gt;Oct&lt;/option&gt;
    &lt;option value="11"&gt;Nov&lt;/option&gt;
    &lt;option value="12"&gt;Dec&lt;/option&gt;
  &lt;/select&gt;
  &lt;/select&gt;
  
    &lt;select name="day" id="day"&gt; 
      &lt;option value="-1"&gt;Day:&lt;/option&gt;
      &lt;option value="1"&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;option value="6"&gt;6&lt;/option&gt;
      &lt;option value="7"&gt;7&lt;/option&gt;
      &lt;option value="8"&gt;8&lt;/option&gt;
      &lt;option value="9"&gt;9&lt;/option&gt;
      &lt;option value="10"&gt;10&lt;/option&gt;
      &lt;option value="11"&gt;11&lt;/option&gt;
      &lt;option value="12"&gt;12&lt;/option&gt;
      &lt;option value="13"&gt;13&lt;/option&gt;
      &lt;option value="14"&gt;14&lt;/option&gt;
      &lt;option value="15"&gt;15&lt;/option&gt;
      &lt;option value="16"&gt;16&lt;/option&gt;
      &lt;option value="17"&gt;17&lt;/option&gt;
      &lt;option value="18"&gt;18&lt;/option&gt;
      &lt;option value="19"&gt;19&lt;/option&gt;
      &lt;option value="20"&gt;20&lt;/option&gt;
      &lt;option value="21"&gt;21&lt;/option&gt;
      &lt;option value="22"&gt;22&lt;/option&gt;
      &lt;option value="23"&gt;23&lt;/option&gt;
      &lt;option value="24"&gt;24&lt;/option&gt;
      &lt;option value="25"&gt;25&lt;/option&gt;
      &lt;option value="26"&gt;26&lt;/option&gt;
      &lt;option value="27"&gt;27&lt;/option&gt;
      &lt;option value="28"&gt;28&lt;/option&gt;
      &lt;option value="29"&gt;29&lt;/option&gt;
      &lt;option value="30"&gt;30&lt;/option&gt;
      &lt;option value="31"&gt;31&lt;/option&gt;
    &lt;/select&gt;
  
    &lt;select name="year" id="year"&gt;&lt;option value="-1" selected="selected"&gt;Year&lt;/option&gt;&lt;option value="2000"&gt;2000&lt;/option&gt;&lt;option value="1999"&gt;1999&lt;/option&gt;&lt;option value="1998"&gt;1998&lt;/option&gt;&lt;option value="1997"&gt;1997&lt;/option&gt;&lt;option value="1996"&gt;1996&lt;/option&gt;&lt;option value="1995"&gt;1995&lt;/option&gt;&lt;option value="1994"&gt;1994&lt;/option&gt;&lt;option value="1993"&gt;1993&lt;/option&gt;&lt;option value="1992"&gt;1992&lt;/option&gt;&lt;option value="1991"&gt;1991&lt;/option&gt;&lt;option value="1990"&gt;1990&lt;/option&gt;&lt;option value="1989"&gt;1989&lt;/option&gt;&lt;option value="1988"&gt;1988&lt;/option&gt;
    &lt;/select&gt;
  </code></pre>
  
  <p>and the php to get the variables:</p>
  
  <pre><code>       &lt;?php //setting checking
         $month=$_POST['month'];
          $day=$_POST['day'];
          $year=$_POST['year'];
         ?&gt;
  </code></pre>
  
  <p>the second select fields are as same as the first one</p>