Hi
Thank you so much for replying. This might be a really stupid question but how do i print out the query?
I'm actually using code from a 'book about PHP so i'm not entirely sure i'm not entirely certain if it's declaring $forumnumrows or not (still quite a novice in that department). The entire code is as follows;
<?php
require("header.php");
$catsql = "SELECT FROM categories;";
$catresult = mysql_query($catsql);
echo "<table cellspacing=0>";
while($catrow = mysql_fetch_assoc($catresult)) {
echo "<tr class='head'><td colspan=2>";
echo "<strong>" . $catrow['name'] . "</strong></td>";
echo "<tr>";
$forumsql = "SELECT FROM forums WHERE categories_id = " . $catrow['id'] . ";";
$forumresult = mysql_query($forumsql);
if($forumnumrows ==0) {
echo "<tr><td>No forums!</td></tr>";
}
else {
while($forumrow = mysql_fetch_assoc($forumresult)) {
echo "<tr>";
echo "<td>";
echo "<strong><a
href='viewforum.php?id="
. $forumrow['id'] . "'>" .
$forumrow['name'] . "</a></strong>";
echo "<br/><i>" . $forumrow['description'] . "</i>";
echo "</td>";
echo "</tr>";
}
}
}
echo "</table>";
require("footer.php");
?>
Thanks again for your help