how can i get the value of the rows every time i clicked the correspondent button heres my code for form
<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>
what i want is to get the value of the rows every time i clicked the correspondent button so that i can update it