Page 1 of 1

Question about allowing comments

Posted: Mon May 24, 2004 6:19 am
by fivestarsoul182
Alright I have been searching for a very long time but I can't find anything that will help me. I have a website and I post news, and I want people to be able to post comments on the news I post, like the main page of this site where people can leave comments on it. I have no idea how to do it and if someone could help me that would be greatly appreciated. Thank you.

Posted: Mon May 24, 2004 7:13 am
by d3ad1ysp0rk
Posts table:
id | content | date

comments:
id | post_id | content | poster | email | date

Code: Select all

<?php
$result = mysql_query("SELECT * FROM comments WHERE post_id = '" .$_GET['id']. "'");
while($row = mysql_fetch_array($result)){
echo "Name: " .$row[poster]. "<br />";
echo "Email: " .$row[email]. "<br />";
echo "Content: <br />" .$row[content];
}
?>