title: Create HTML table from sql table
body: <p>I have a table in a SQL database with the following fields: ID, Name, Email, University, Languages, and Experience. I want to create an html table that fetches data from SQL and outputs the last 10 results? How would I do that?</p>
  
  <p>I'm sorry if this is a very simple question, I have very little knowledge in PHP and SQL. </p>
  
  <p>Here's the code I have right now that just displays the name and not in a table:</p>
  
  <pre><code>    &lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;Last 5 Results&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;?php
              $connect = mysql_connect("localhost","root", "root");
              if (!$connect) {
                  die(mysql_error());
              }
              mysql_select_db("apploymentdevs");
              $results = mysql_query("SELECT * FROM demo");
              while($row = mysql_fetch_array($results)) {
  
                  echo $row['Name'] . "&lt;/br&gt;";
  
  
              ?&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>