0) { // Delete the comment $qry = "DELETE FROM comment WHERE id = $c_id"; $run = mysqli_query($conn, $qry); if ($run) { // Display alert and redirect echo ""; exit; } else { echo "Error deleting comment: " . mysqli_error($conn); } } else { echo "Invalid request."; } // Close the database connection mysqli_close($conn); ?>