hello, any help would be much appreciated! I am trying to display some details from a database table, but this code is not working.
Error is:
Parse error: syntax error, unexpected $end in D:\devserver\admin\clubs\outputfunctions.php on line 91
This is the part of the page that should display the details from the database table:
$sql = "SELECT club_id FROM clubs " .
"ORDER BY club_name DESC";
$result = mysql_query($sql, $conn);
if (mysql_num_rows($result) == 0) {
echo " <br>\n";
echo " There are currently no clubs to view.\n";
} else {
while ($row = mysql_fetch_array($result)) {
outputClubs($row['club_id']);
}
}
And it calls the outputClubs function which is here:
function outputClubs($club) {
global $conn;
if ($club) {
$sql = "SELECT *" .
"FROM clubs" .
"WHERE club_id = " . $club;
$result = mysql_query($sql,$conn);
if ($row = mysql_fetch_array($result)) {
echo "<h3>" . htmlspecialchars($row['club_name']) . "</h3>";
echo nl2br(htmlspecialchars($row['club_desc']));
}
}
Any suggestions as to where I am going wrong?
Thanks - Gareth