i already tries many times by changing the code..still failed to delete them..i need delete the comment which the user want delete his comment related with his comment_id and id..but something very strange that when click the delete button,it will pop out deleted successfully but actually nothing to delete..
thanks in advance..
Code: Select all
<?php
session_start();
require_once 'config.php';
$id=$_SESSION['id'];
$comment_id=$_REQUEST['comment_id'];
$query = 'DELETE FROM comment WHERE comment_id = "$comment_id" AND id = "$id"';
mysql_query( $query);
echo"<script>alert(\"Deleted successfully!\")</script><script>window.location='comment.php?id=$id'</script>";
?>