-4

我目前正在设计一个多媒体网站,人们可以查看音乐家的传记。我希望用户能够评论特定音乐家的每个传记页面。

我希望人们能够分别对每一页发表评论,而不会在另一页上显示来自一个页面的评论。我还想为每个评论包括一个竖起大拇指和向下竖起大拇指的系统。先感谢您::

4

2 回答 2

0

All you have to do is Google PHP comment box tutorial and you will find several tutorials on how to do this. The answer is too long to put in this answer, so I will include a link to a tutorial that I found. You may have to modify this a bit to include your specific field, but everything you need to know is in this tutorial.

www.findsource.com tutorial: http://www.findsourcecode.com/php/commentbox.htm

In order to have this comment section on every page you would need to add the following code to each form:

<input type="hidden" name="Mid" value="musician-id#">

Then when you display the comments, you jut have to modify the query to something like:

SELECT * FROM tblname WHERE Mid = musician-id#

This will now work on each biography page.

于 2013-01-26T16:28:07.900 回答
0

在数据库中创建一个comments表。在其中插入一个MusicianID指向musicians表格的字段。当显示音乐家页面时,加载所有正确的评论MusicianID

SELECT [...] FROM `comments` WHERE MusicianID = [id]
于 2013-01-26T16:24:14.450 回答