How to use PHP to develop a blog comment system! I just learned PHP and used my knowledge to create a simple blog. now I can post an article and use the message board function. now I want to build a blog comment system! It is the comment below every article! All I know is that we can build a message board under every article like building a message board. this is like commenting on how to use PHP to develop a blog comment system!
I just learned PHP and used my knowledge to create a simple blog. now I can post an article and use the message board function. now I want to build a blog comment system!
It is the comment below every article!
All I know is that I can build a message board under every article like a message board. this is like a comment system, but in this case, this is equivalent to creating a database table for every article. this is not realistic!
There should be a more reasonable method. please give me some advice !!!
------ Solution --------------------
Create a comment table
The Id of the article commented on by the pid. Retrieve and query from the article table
Content comment
Time comment time
SQL code
Create table comment ('id' MEDIUMINT AUTO_INCREMENT, 'pid 'MEDIUMINT, 'content' VARCHAR (250), 'Time' INT (10), primary key ('id '), INDEX ('pid '))
------ Solution --------------------
The topic has an id, and the reply is associated with the topic.