0
怎麼每次我點擊相應按鈕 我的繼承人對錶單代碼時得到行的值AJAX PHP的GET行值
<form action="<?php echo $_SERVER["PHP_SELF"];?>" method="post">
<tbody>
<?php
while ($reserve=mysqli_fetch_array($record)) {
echo "<tr>";
echo "<td>".$reserve['id']."</td>";
echo "<td>".$reserve['room']."</td>";
echo "<td>".$reserve['status']."</td>";
echo "<td>".$reserve['client']."</td>";
echo "<td>".$reserve['dateandtime']."</td>";
echo "<td>₱ ".$reserve['balance']."</td>";
echo "<td>".$reserve['additional']."</td>";
?>
<td style="text-align: center;">
<div class="ui buttons">
<button type="submit" name="approved" class="Huge ui green button" id="update">Approved</button>
<button type="submit" name="cancel" class="Huge ui red button">Cancel</button>
<button type="submit" name="checkin" class="Huge ui teal button">Check In</button>
<button type="submit" name="checkout" class="Huge ui violet button">Check Out</button>
</div>
</td>
</tr>
<?php } ?>
</tbody>
我想要的是讓每次行的值我點擊了記者按鈕,這樣我可以更新
由於這是工作,但我怎麼能叫這在PHP? $ ID = $ _POST [ 'ID']; ? – Hysteria
嘿@Hysteria,我已經更新了PHP腳本的代碼,我已經使用jQuery的阿賈克斯。看看這可以幫助你:) – Harish