I'm showing data from mysql database in Table with below code
<td><?php echo $row['name']; ?></td>
<td><?php echo $row['image']; ?></td>
<a title="Delete" href="deletestudent.php?id=<?php echo $row['id']; ?>"><button class="btn btn-danger btn-mini"> Delete</button></a></td>
I am able to delete the row with below code
<?php
include('../connect.php');
$id=$_GET['id'];
$result = $db->prepare("DELETE FROM student WHERE id= :memid");
$result->bindParam(':memid', $id);
$result->execute();
header ("location: students.php");
?>
Thanks in advance.