<?php
/**
* @author Donald Dubuque
* @copyright 2008
*/
// This calls the file #header.php# into the page
require("header.php");
// Call to dB
$catsql = "Select * FROM categories;";
$catresult = mysql_db_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 cat_id = " . $catrow['id'] . ";";
$forumresult = mysql_query($forumsql);
$forumnumrows = mysql_num_rows($forumresult);
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");
?>
My problem is where it has
$forumsql = "SELECT" * FROM
forums WHERE cat_id = " . $catrow['id'] . ";";
$forumresult = mysql_query($forumsql);
$forumnumrows = mysql_num_rows($forumresult);
if($forumnumrows == 0) {
echo "<tr><td>No forums!</td></tr>";
}
The error is
Parse error: syntax error, unexpected T_STRING in C:\xxx\xxx\htdocs\index.php
Could some one lead me in the right direction?
Thanks😃