Hi,
Part of my database has a table in it that contains newsgroups. The table has three columns - ID (autogenerated), URL (news:rec.climbing), Category (Climbing) - for example, and I want to pull the URL's from each Category and create links to them. The link would be in the format <LI><A HREF="news:rec.climbing">rec.climbing</A> - rec.climbing.
This is the code I'm trying to use, but that doesn't seem to work :
<?php
$HTTP_GET_VARS[´Category´];
$db = mysql_connect("localhost", "xxxxxx");
mysql_select_db("Outdoors",$db);
$result = mysql_query("SELECT URL FROM newsgroups WHERE Category = ´$Category´ ORDER BY URL",$db);
echo "<table border=1 width=600>";
echo "<tr><td>";
echo "<ul>";
if ($myrow = mysql_fetch_array($result)) {
do {
printf("<LI><A HREF=\" %s \">%s</A> - \"%s\"\n", $myrow["URL"], $myrow["URL"], $myrow["URL"]);
} while ($myrow = mysql_fetch_array($result));
echo "</ul>";
echo "</td></tr>";
echo "</table>";
} else {
echo "Sorry, no records were found!";
}
?>
I'm obviously missing an important concept here, but I'm not sure what it is. Any help would be appreciated.
Thanks!