title: Expand Table Row with Additional information Fetched from Database
body: <p>Here is a little demonstration of what I want achieved.</p>
  
  <p><img src="https://i.stack.imgur.com/qsmXZ.png" alt=""></p>
  
  <p>What I want, is a clickable row with additional information fetched from the database.
  I've seen some examples with Jquery, but those have some kind of static information in the expanded area. I want to load in this additional information, only after the row is clicked - so I wont have to load in too much information that might not be used.</p>
  
  <p>Now, inside the expanded area, I need the additional information to be fetched like:</p>
  
  <pre><code>while($row = mysql_fetch_array($result))
  {
      echo "&lt;tr&gt;";
      echo "&lt;td&gt;" . $row['manufacturer'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['describtion'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['rdate'] . "&lt;/td&gt;";
      echo "&lt;td&gt;" . $row['locked'] . "&lt;/td&gt;";
      echo "&lt;/tr&gt;"; 
  }
  </code></pre>
  
  <p>But only if a specific row is clicked.</p>
  
  <pre><code>&lt;?php
       $con = mysql_connect("localhost","root","");
       if (!$con)
       {
          die('Could not connect: ' . mysql_error());
       }
  
       mysql_select_db("phone", $con);
  
       $result = mysql_query("SELECT * FROM info");
  
       echo "&lt;table border='1'&gt;
             &lt;tr&gt;
                 &lt;th&gt;Model&lt;/th&gt;
                 &lt;th&gt;Software&lt;/th&gt;
                 &lt;th&gt;Carrier&lt;/th&gt;
                 &lt;th&gt;Price&lt;/th&gt;
             &lt;/tr&gt;";
  
       while($row = mysql_fetch_array($result))
       {
          echo "&lt;tr&gt;";
          echo "&lt;td&gt;" . $row['model'] . "&lt;/td&gt;";
          echo "&lt;td&gt;" . $row['os'] . "&lt;/td&gt;";
          echo "&lt;td&gt;" . $row['carrier'] . "&lt;/td&gt;";
          echo "&lt;td&gt;" . $row['price'] . "&lt;/td&gt;";
          echo "&lt;/tr&gt;";
       }
       echo "&lt;/table&gt;";
  
       mysql_close($con);
    ?&gt;
  </code></pre>
  
  <p>I have really done extensive searching, but that didn't get me closer to a solution.
  Would it be better if I added HTML to the code, and somehow fetched the data inside the td tags?</p>