当您为特定文章插入评论时,请存储成员(评论者)的 ID 或名称或任何唯一的东西。在插入评论之前输入验证码....
Select * from articles where member_commented_id = [current_member_id_from_querystring) and article_id = member_commented_on_article_id
//a check point
if result is > 0 .. its mean member already has commented on this article
//otherwise
add comments on article and insert member id as well for checking
// if you are using seperate table for comments then you have to make additional field in table like
comment_id, comment, com_date, member_id_who_commented, article_id_on_which_commented
设置 IP 或 Cookies 检查点是不可靠的,因为 IP 由 ISP 更改(如果设置为动态 IP)并且 Cookies 可以被访问者清除
希望这可以帮助你