Question about allowing comments
Moderator: General Moderators
-
fivestarsoul182
- Forum Newbie
- Posts: 1
- Joined: Mon May 24, 2004 6:19 am
Question about allowing comments
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.
-
d3ad1ysp0rk
- Forum Donator
- Posts: 1661
- Joined: Mon Oct 20, 2003 8:31 pm
- Location: Maine, USA
Posts table:
id | content | date
comments:
id | post_id | content | poster | email | date
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];
}
?>