i have to buttons one to display the info of each order and one to delete the order after been dispatch. How can i make the delete button work. Because the "view-order works but the delete one doesn't. I need to delete each row individually with the button.
<?php
require_once 'dbconnection.php';
$sql = "SELECT * from Orders";
$result = mysqli_query($conn, $sql);
if ($result -> num_rows > 0){
while ($row = $result-> fetch_assoc()){
echo "<tr><td>". $row["name"] ."</td><td>". $row["student_id"] ."</td><td>". $row["ordr_num"]
."</td><td><button class='btn btn-small' id='{$row["ordr_num"]}'>View Order</button></td>
<td><button class='btn btn-small'}'>Delete</button></td></tr>";
}
}
else{
echo "0 result";
}
i need to be able to delete each row individually but i really don't know how. I tried running a delete scrip before my if but it didn't work.