I just want add a delete button that can delete 1 perticular row from database.
The output of my script is like this-:
username 12334
username1 12334
But i want something like this-:
username 12334 delete
username1 12334 delete
so that if i click on second rows's delete then i want it removed from the database.
$con=mysqli_connect("localhost","root","","****");
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
$list="select d_name,d_amount from donated order by d_id desc limit 10;";
$data=mysqli_query($con,$list);
echo "<table border='1'>";
echo "<tr><td>" ."<strong>NAME OF DONER(s)</strong>" . "</td><td>" . "<strong>AMOUNT DONATED</strong>" . "</td></tr>";
while($info = mysqli_fetch_array($data))
{
echo "<tr><td>" . $info['d_name'] . "</td><td>" . $info['d_amount'] . "</td></tr>";
}
echo "</table>";