title: Auto populate select fields in a PHP form with a drop down selection
body: <p>I use bootstrap and CI. I created a form contain 2 drop down that retrieves data from MySQL.</p>
  
  <p>I have <code>tb_sekolah</code> table with <code>id</code>, <code>kota</code>, <code>nama</code>, <code>provinsi</code> and <code>status_sekolah</code> as column names.</p>
  
  <p>I did show data from <code>kota</code> in <code>tb_sekolah</code> table in the first dropdown. The problem is, I would like to show data from <code>nama</code> in the second dropdown. If user select data in the first dropdown then the second dropdown show data from <code>nama</code>. </p>
  
  <p>Example: Column <code>kota</code> has data such as yogyakarta, bantul, and sleman. Column <code>nama</code> has data such as <code>sma 1 yogyakarta</code>, <code>sma 3 yogyakarta</code>, <code>sma 1 sewon</code>, <code>sma 1 sleman</code>. If user selects <code>yogyakarta</code> in the first dropdown then the second dropdown only shows <code>sma 1 yogyakarta</code> and <code>sma 3 yogyakarta</code></p>