title: Pull database info and display to html problem?
body: <p>I'm trying to display the information from the database to the html page but it is only displaying the message "connected successfully". The name of the database is "admin" and the table within that database is called "users". I have no idea how to get past the message and just display the table I have created.</p>
  
  <p>Index page (index.php):</p>
  
  <pre><code>&lt;?php
  include_once('connection.php');
  $query="select * from users";
  $result=mysql_query($query);
  ?&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;title&gt;
      &lt;head&gt; Fetch Data Frome Database&lt;/head&gt;
  &lt;/title&gt;
  &lt;body&gt;
  
  &lt;table align="center" border="1px" style="width:250px;       line-height: 30px;"&gt;
      &lt;tr&gt;
          &lt;th colspan="4"&gt;&lt;h2&gt;Account Record&lt;/h2&gt;&lt;/th&gt;
      &lt;/tr&gt;
      &lt;t&gt;
          &lt;th&gt;ID&lt;/th&gt;
          &lt;th&gt;Username&lt;/th&gt;
          &lt;th&gt;Password&lt;/th&gt;
      &lt;/t&gt;
  
      &lt;?php
  
      while($rows=mysql_fetch_assoc($result))
      {
      ?&gt;
  
      &lt;tr&gt;
          &lt;td&gt;&lt;?php echo $rows['ID'];?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $rows['username'];?&gt;&lt;/td&gt;
          &lt;td&gt;&lt;?php echo $rows['password'];?&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;?php
      }
  
      ?&gt;
  
  &lt;/table&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CONNECTION PAGE (connection.php):</p>
  
  <pre><code>&lt;?php
  //Include your own values for username, password and     dbase name
  
  $host = "localhost";
  $username = "root";
  $password = "root";
  $dbname = "admin";
  
  // Create connection
  $conn = new mysqli($host, $username, $password,     $dbname);
  
  // Check connection
  if ($conn-&gt;connect_error) {
  die("Connection failed: " . $conn-&gt;connect_error);
  } 
  echo "Connected successfully";
  ?&gt;
  </code></pre>