I'm creating a simple contact system with admin page. Admin can delete messages. I use
<form> tag and submit button to send them to action file but no rows will be deleted.
<?php
while ($row = mysqli_fetch_array($result)) {
    $adminmsgn = $row['name'];
    $adminmsge = $row['email'];
    $adminmsgm = $row['msg'];
    echo("
      <form name='actions' action='delete.php' method='post'>
    <tr>
      <td style='color: white'>$adminmsgn</td>
      <td style='color: white'>$adminmsge</td>
      <td style='color: white'>$adminmsgm</td>
      <td style='color: white'><input style='text-decoration: none;color: white' class='linkButton' type='submit' value='Delete'></td></form>
    </tr>
    ");
}
?>
delete.php:
<?php include("connection.php");
mysqli_query($link, "DELETE FROM `msg` WHERE `name` = '$adminmsgn' AND `email`= '$adminmsge' AND `msg`= '$adminmsgm'");
header("Location: http://localhost:8080/contact/admincp.php");
?>
 
     
    