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
Share on other sites

It's pretty straight forward. At it's simplest, a user clicks a report button, a record is added to the *reports* table that stores the id of the thing being reported.

 

You then simply display a list of these reports wherever you like.

Link to comment
Share on other sites

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?

Edited by bunnyali2013
Link to comment
Share on other sites

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
}

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.