title: How to get selected value from mysql to dropdown list?
body: <p>I have question about dropdown list in php using mysql to populate it.
  I'll try to describe it as clear as possible.</p>
  
  <p>First, the tables</p>
  
  <pre><code>|              Cars            |      |      Colors       |
  --------------------------------      ---------------------
  |car_id|     name   | color_id |      |color_id|color_name|
  --------------------------------      ---------------------
  | 01   |   BMW      |   c1     |      |  c1    |  Silver  |
  | 02   |   Audi     |   c2     |      |  c2    |  Black   |
  | 03   | Chevrolet  |   c3     |      |  c3    |  White   |
  </code></pre>
  
  <p>I already create form to input a car data to <code>cars</code> table. In that form i create a dropdown list to get <code>color_name</code>,
  and there was no problem to save it. The problem is how to get selected <code>color_name</code> on update form using dropdown?</p>