If you have any <?php ?> tags in your script, you have to save it with the extension .php . If you want to save it with .html extension, then you need to modify your htaccess file. You can make use of only 1 page/script to do everything.
-- list the comments here --
...
....
Have the fields for name, comments etc, with a submit button. When the form is submitted, get the values and insert it to the table ! A small example.
<?php
if(isset($_POST['submit'])){
$comment=$_POST['comment'];
$q="insert into comments_table (comment) values ('$comment')";
mysql_query($q);
}
$q="select comments from comments_table";
$result=mysql_query($q);
while($row=mysql_fetch_array($result)){
//list the comments
echo $row['comments']."<br />";
}
?>
<html>
<body>
<form method="Post" action="comments.php">
<textarea name="comments" rows=30 cols=10></textarea>
<input type="submit" name="submit" value="submit">
</form>
</body>
</html>
This is just an example. And comments should be above the 'comment box'..
Cheers,
Naveen
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
*PM asking for help will be ignored*