title: How to create a Hyperlink from a MySQL record set with PHP?
body: <p>I'm a complete beginner with HTML/CSS/PHP/MySQL, and I am using XAMPP to run a local MySQL/Apache server for testing purposes. I decided to create a simple page as a learning exercise that will create a table with data read from a MySQL table.</p>
  
  <p>I have a MySQL table with 2 columns: Title and link. The 'Title' column lists the name of a Steam game, while the 'link' column contains a link to the Steam store page for that game.</p>
  
  <p>I have done some searching to get a basic idea of how to do this, and I've almost got it working, but for some reason the data from the 'Title' column is displayed horizontally instead of vertically.</p>
  
  <p>I'm a brand new member so I can't post images yet, but here's a link to a screenshot to clarify: <a href="http://i.imgur.com/kQPIrKX.png" rel="nofollow">http://i.imgur.com/kQPIrKX.png</a></p>
  
  <p>I want Far Cry 3 to be listed vertically underneath of //N.P.P.D. RUSH, but instead it is listed to the right.</p>
  
  <p>and here is the code:</p>
  
  <pre><code>&lt;body&gt;
  
  &lt;h1&gt;Steam&lt;/h1&gt;
  
  &lt;?php
  $con=mysqli_connect('localhost','root','password','test1');
  // Check connection
  if (mysqli_connect_errno())
  {
  echo 'Failed to connect to MySQL: ' . mysqli_connect_error();
  }
  
  $result = mysqli_query($con,'SELECT * FROM steam ORDER BY Title');
  
  echo '&lt;table border=1&gt;
  &lt;tr&gt;
  &lt;th&gt;Title&lt;/th&gt;
  &lt;/tr&gt;';
  
  while($row = mysqli_fetch_array($result))
  {
  echo '&lt;td&gt;&lt;a href="'.$row['link'].'"&gt;'.$row['Title'].'&lt;/a&gt;&lt;/td&gt;';
  }
  echo '&lt;/table&gt;';
  
  mysqli_close($con);
  ?&gt;
  
  &lt;a href="#" onClick="history.go(-1);return true;"&gt;previous&lt;/a&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I know I'm overlooking something simple, but I'm too much of a beginner to know what.</p>
  
  <p>Thanks in advance.</p>