title: Feed select options from DB depending on another select options
body: <p>I have a form that has two select fields, one representing the region and one the name of the city/village/etc. I have a database with all these entries in the following form: </p>
  
  <pre><code>id (int 11, ai)
  region (varchar 50) 
  city(varchar 50)
  </code></pre>
  
  <p>I've found a script here on so that lets you select different options but it's made with JS and I have no idea how to adapt it to my needs. I need a database because I have 13.000+ entries and it's not really a good idea to enter them manually in the code. Here is the link to the topic that I've read, it's solution is in one of the comments as well.        </p>
  
  <p><a href="https://stackoverflow.com/questions/4480637/how-to-change-a-selections-options-based-on-another-select-option-selected">how to change a selections options based on another select option selected?</a>. </p>
  
  <p>Please let me know if I need to edit my post before downrating. Thanks in advance!</p>