On my website, I recently added a comment system for games. What I want to do is add an 'X' button so that users can delete their comments if they choose. Before I can do this, I need a PHP function that will remove that specific comment from the database. How should I go about this?
Here is how the comment is added to the database:
$tuturl = $_POST["tuturl"];
$tutid2 = $_POST["tutid2"];
$name = $_POST["name"];
$url = $_POST["url"];
$email = $_POST["email"];
$message = $_POST["message"];
$user_id = $_POST["user_id"];
$sendcomment = mysql_query("INSERT INTO comments SET tutorialid='$tutid2', name='$name', url='$url', email='$email', comment='$message', date=now(), user_id='$user_id' ");
Any help would be greatly appreciated!
*Note - More Detail*
Here's the tutorial I followed for my comment system: