title: Selected dropdown always changed after submit
body: <p>i have a dropdown for month and year , but after submit this dropdown alwas back to default (january)  . i used Codeigniter </p>
  
  <pre><code>&lt;label&gt;Bulan&lt;/label&gt;&lt;br&gt;
                    &lt;select name="bulan"&gt;
                        &lt;!-- &lt;option value=""&gt;Pilih&lt;/option&gt; --&gt;
  
                        &lt;option value="01"&gt;Januari&lt;/option&gt;
                        &lt;option value="02"&gt;Februari&lt;/option&gt;
                        &lt;option value="03"&gt;Maret&lt;/option&gt;
                        &lt;option value="04"&gt;April&lt;/option&gt;
                        &lt;option value="05"&gt;Mei&lt;/option&gt;
                        &lt;option value="06"&gt;Juni&lt;/option&gt;
                        &lt;option value="07"&gt;Juli&lt;/option&gt;
                        &lt;option value="08"&gt;Agustus&lt;/option&gt;
                        &lt;option value="09"&gt;September&lt;/option&gt;
                        &lt;option value="10"&gt;Oktober&lt;/option&gt;
                        &lt;option value="11"&gt;November&lt;/option&gt;
                        &lt;option value="12"&gt;Desember&lt;/option&gt;
                    &lt;/select&gt;
                          &lt;script type="text/javascript"&gt;
                            document.getElementById('bulan').value = "&lt;?php echo $_GET['bulan'];?&gt;";
                          &lt;/script&gt;
                  &lt;/div&gt;
                  &lt;div class="tahun" align="center"&gt;
                  &lt;?php
                  $now=date('Y');
                  echo "&lt;select name=tahun&gt;";
                  for ($a=2010;$a&lt;=$now;$a++)
                  {
                       echo "&lt;option value='$a'&gt;$a&lt;/option&gt;";
                  }
                  echo "&lt;/select&gt;";
                  ?&gt;
                  &lt;script type="text/javascript"&gt;
                    document.getElementById('tahun').value = "&lt;?php echo $_GET['tahun'];?&gt;";
                  &lt;/script&gt;
                  &lt;br&gt;&lt;br&gt;
                  &lt;input type="submit" name="submit"&gt;
                  &lt;/div&gt;
                &lt;/form&gt;
  </code></pre>
  
  <p>i referenced this code from this <a href="https://stackoverflow.com/questions/2246227/keep-values-selected-after-form-submission">question</a>
   but its not work ,can someone help me ?
  and its my controler</p>
  
  <pre><code> public function view_status(){
  
  
      $year = $this-&gt;input-&gt;post('tahun');
      $month = $this-&gt;input-&gt;post('bulan');
  
      $this-&gt;data['hasil']=$this-&gt;app_model-&gt;status_data($year,$month);
  
      $this-&gt;load-&gt;view('view_status',$this-&gt;data);
  
  }
  </code></pre>