title: Display MySQL Results into HTML Table with URL
body: <p>The code below isn't working as intended.  I was wanting 3 columns with the first column being a site name, the second column being the category, and the third being the URL for RSS (haven't gotten to that part yet).  The data is in the database but when I view the result of the statements below, the site name results link to the current web page I am on.  I would greatly appreciate any assistance with getting each column of data to display on the page correctly.  Thank you</p>
  
  <pre><code>&lt;?php
  
  $query="SELECT * FROM SOMETABLE";
  $result=mysql_query($query);
  $num = mysql_numrows($result);
  
  echo "
  &lt;table border='1'&gt;
  &lt;th&gt;Site Name:&lt;/th&gt;
  &lt;th&gt;Category:&lt;/th&gt;
  &lt;th&gt;RSS:&lt;/th&gt;";
  
  $i=0;
  while ($i &lt; $num) {
  
  $siteName =mysql_result($result,$i,"siteName");
  $category =mysql_result($result,$i,"category");
  $category =mysql_result($result,$i,"url");
  $rss =mysql_result($result,$i,"rss");
  
  echo "
  &lt;tr&gt;
  &lt;td&gt;&lt;a href='$url'&gt;$siteName&lt;/a&gt;&lt;/td&gt;
  &lt;td&gt;$category&lt;/td&gt;
  &lt;td&gt;$rss&lt;/td&gt;
  &lt;/tr&gt;";
  $i++;
  }
  
  ?&gt;
  </code></pre>