Hi -
The whole point of PHP is that it lets you modify your HTML before you send it to the server!
Suggestion: name *all* the pages on your site ".php". Even if they're pure HTML. For example:
Code:
<html>
<head>
<title>Hello world</title>
</head>
<body>
Hello World
</body>
</html>
<= Create this page as "hello.php"
Then, in your scenario, you can modify it like this:
Code:
<html>
<head>
<title>Hello world</title>
</head>
<body>
Hello World
<?php
//gather all the comments
$commentquery = mysql_query("SELECT * FROM comments WHERE tutorialid='$tutid' ORDER BY date DESC") or die(mysql_error());
//count all the comments for the total
$commentNum = mysql_num_rows($commentquery);
// Display results
if ($commentNum == 0) {
echo "<p>There were no comments</p>";
}
else {
echo "<p>There were $CommentNum comments</p>";
?>
</body>
</html>
'Hope that helps .. PSM
PS:
Please consider the suggestion about looking at bulletin board software I made in the previous post. But I'm glad your looking at mySQL to store your comments, and it looks like you're making great progress!