title: Creating drop down menu using php, sql connected to database table
body: <p>I'm creating currently database with tables and trying to do it using second normalization form for my school.</p>
  
  <p>I have list of institutional partners which has to be displayed in two tables.
  I got this far that I have created database tables: 
  The first one called "as_partners_id" which contain columns: "Partner_ID" (this is primary key INT) and "Partner" (just a VARCHAR). 
  The other table called "as_partners" has some more columns, like: "Partner_ID, Country, EU terms, NON-EU terms, More info".</p>
  
  <p>What I want to do is create drop down menu above first table from which you can choose ID from e.g. 1 to 30. After picking it will display the second table with more information about this particular ID. But I actually don't know how to do it properly. Here is the code that I have so far:</p>
  
  <pre><code>&lt;?php
  // Create connection
  $con=mysqli_connect("localhost","easj_admin","","easj");
  
      // Check connection
      if (mysqli_connect_errno())
  
  // Check connection
  if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    } else {
      echo "We are connected.";
      }
  
      $result = mysqli_query($con,"SELECT Partner_ID, Partner FROM as_partners_id");
  
  ?&gt; 
  </code></pre>
  
  <p>BODY PART:</p>
  
  <pre><code>&lt;table&gt;
      &lt;tr&gt;
      &lt;?php
  
       // Get field information for all fields
    while ($fieldinfo=mysqli_fetch_field($result))
      {
          echo "&lt;th&gt;" . $fieldinfo-&gt;name ."&lt;/th&gt;";
      }
      echo "&lt;/tr&gt;";
  
      // &lt;form&gt;
      // &lt;input typ="select"&gt;
      // &lt;/form&gt; 
    while($row = mysqli_fetch_array($result))
    {
      echo "&lt;tr&gt;";
    echo "&lt;td&gt;" . $row['Partner_ID'] . "&lt;/td&gt;&lt;td&gt;" . $row['Partner'] . "&lt;/td&gt;" ;
    echo "&lt;/tr&gt;";
    }
  
      ?&gt;
  
      &lt;/table&gt; 
  </code></pre>
  
  <p>How can I add to my code this drop down menu that will display the second table called as_partners?
  Please help.</p>