Jump to content

Delete Row From Comment


ambo

Recommended Posts

Hey I have a basic comment script and i want to be able to make a link that says delete next to a message

DELETE FROM `comments` WHERE CONVERT(`comments`.`author` USING utf8) = 'admin' AND CONVERT(`comments`.`user` USING utf8) = 'Glenh' AND CONVERT(`comments`.`comment` USING utf8) = 'Enter your comment here....' AND CONVERT(`comments`.`date` USING utf8) = '01/8/09 05:58 pm' LIMIT 1;

<?

include("admin/dbconnect.php");

$getcomments = mysql_query("select * FROM comments WHERE user = '$req_user' ORDER BY date DESC");

while($r=mysql_fetch_array($getcomments)){

extract($r);

 

echo "<tr><td colspan=\"2\"><span class=\"style13\">From $author $date</span></td></tr>";

echo "<tr><td colspan=\"2\"><hr width=\"95%\" color=\"#000000\" /></td></tr>";

echo "<tr><td width=\"10\"> </td><td width=\"380\"><div align=\"left\"><span class=\"Style12\">$comment</span></div></td></tr>";

echo "<tr><td>-</td><td align=\"left\"><a href=\"profile.php?user=$author\">Reply</a>DELETE COMMENT</td></tr>";

 

 

 

}

?>

Link to comment
https://forums.phpfreaks.com/topic/140083-delete-row-from-comment/
Share on other sites

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.