title: DROPLIST DOWN, LOOP WHILE, Foreign key
body: <p>I would like to display 2 dropdown lists. My 2 dropdown lists are in fact 2 foreigns keys (<code>fk_candidat, fk_course</code>). 
  I can recover only 1 foreign key for now, which is the <code>fk_candidat</code> </p>
  
  <p>Here is a example below </p>
  
  <p><a href="https://i.stack.imgur.com/gfiFx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/gfiFx.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;form action="add_facture.php" method="POST"&gt;
    &lt;table&gt;
      &lt;tr&gt;
        &lt;td&gt;Date:&lt;/td&gt;
        &lt;td&gt;&lt;input type="date" name="dateSaisie" style="width:142px"&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td&gt;Candidat:&lt;/td&gt;
        &lt;td&gt;
          &lt;select name="fk_candidat" style="width:148px"&gt;
  &lt;?php
  while($row = $sql-&gt;fetch()) {
  ?&gt;
            &lt;option value="&lt;?= $row['id_candidat']; ?&gt;"&gt;&lt;?= $row['name_candidat'];?&gt;&amp;nbsp;&lt;?= $row['firstname_candidat'];?&gt;&lt;/option&gt;
  &lt;?php
  }
  ?&gt;
          &lt;/select&gt;
      &lt;tr&gt;
        &lt;td&gt;Id cours:&lt;/td&gt;
        &lt;td&gt;&lt;input type="text" name="id_course" /&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
        &lt;td colspan="2"&gt;
          &lt;input class="button" type="submit" value="Ajouter"/&gt;
        &lt;/td&gt;
      &lt;/tr&gt;
    &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My problem is here, how to create the dropdown list for the foreign key <code>fk_course</code>?</p>