Jump to content

Report Or Flagging System


bunnyali2013

Recommended Posts

I want to know, how to make a report or flagging system for spam comments?

 

Suppose I have a table which is displayed from my database. In the table there are 3 columns, the first for name, the second for comment and the third is a button where a people can click to report as spam. I want to know how I can get the notification in MySQL? I mean how to proceed or what ways I can do it?

Link to comment
https://forums.phpfreaks.com/topic/270979-report-or-flagging-system/
Share on other sites

Yes I know! I mean for example look at this forum, there is a "flag report" above on each post. I want the same but perhaps more direct. I mean a user will click on a button, and I will get a notification. I mean, how I should proceed this? I want ideas, I will try to make it myself!

I think you have not understood the whole thing! Ok, I will try to explain it easily.

 

I have a table in my database which record comments. The table has 4 columns (User, comments, date and flag). The table will be displayed on a web page except for the flag column not. The flag column will be empty in the database for each comment. On the web page now, at the right of each row, there is a flag button where people can click to report as spam. I mean the flag button is for each comment.

 

I want to know, how to make something, where when a person has clicked on the flag button of a particular comment, I will get a notification in my database that this comment has been flagged by spam? When the person will flag the comment, a text like "Flagged" will be written in the row of the comment in the flag column in the database table.

 

How to do that?

Sorry, I'm really not sure where exactly you are stuck.

 

The button the user clicks would need to submit a request to the server containing the id of the comment they wish to flag.

 

A very simple example:

 

comments.php

some comment blah blab blah
<a href="flag.php?id=22">flag as spam</a>

 

flag.php

<?php

if (isset($_GET['id'])) {
 // execute your query
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.