我想在每一行上添加一个删除按钮,这样当按下该按钮时,我就可以删除记录。我刚开始学习PHP、MySQL和Stack Overflow。
以下是从我的MySQL数据库中提取信息的表格,它是有效的。
<table class="table" >
<tr>
<th> Staff ID </th>
<th> Staff Name </th>
<th> Class </th>
<th> Action </th>
</tr>
<?php
while($book = mysqli_fetch_assoc($records)){
echo "<tr>";
echo "<td>".$book['Staff_ID']."</td>";
echo "<td>".$book['Staff_Name']."</td>";
echo "<td>".$book['Class']."</td>";
echo "</tr>";
}// end while loop