html body mysql result:

$sqlcomments = "SELECT * from sellercomments where Status=1 and SellerID=".$_REQUEST['SellerID']. " order by AddedDate desc";
$resultcomments= mysql_query($sqlcomments);
if (@mysql_num_rows($resultcomments)!=0){
while($row_comments = @mysql_fetch_array($resultcomments))
<div align="right"><img src="../<?=$row_sellerdetails['AboutUsImage']?>" width="40" height="40" border="0"></div>
<?=$row_comments['CommentBy']?>] to <a href="index.php?SellerID=<?=$_REQUEST['SellerID']?>">
<span style="color:#000000"><?=$row_comments['Comment']?></span> <br>

------ end: want to delete this comment result?>>>

Recommended Answers

how delete comment row from mysql using html buton

You can read and try this example:

Jump to Post

All 2 Replies

you can set a variable and use an id

<a href="?delete=<?php echo $row('id'); ?>">Delete</a>

if(isset($_GET['delete']) && !empty($_GET['delete'])) {
    $sql = mysql_query("DELETE FROM yourTable WHERE id = '".mysql_real_escape_string($_GET['delete'])."'");

    if(!$sql) {
        echo 'Error during delete #'.mysql_error()';
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.