我試圖在每行上添加一個刪除按鈕,這樣我可以在按下按鈕時刪除一條記錄。我是PHP和MySQL以及Stack Overflow的新手。在MySQL表格的每一行上添加一個PHP刪除按鈕
下面是我從我的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
的http://計算器。 com/questions/43281598/how-to-delete-a-specific-row-in-a-table-using-javascript#comment73631786_43281598 – mkaatman