I have this query
$sql = ("SELECT * FROM reception WHERE date = '$date'");
  $result = $conn->query($sql); 
which then displays results in a table.
<?php while ($row=$result->fetch_assoc()) { 
    $id = $row['id']; ?>
<tr> 
<td ><?php echo  $id; ?></td>
<td>   
    <form method="post" action="que.php">
    <input type="text" name="bill" placeholder="amount in pula" value="<?php echo  $row['bill']; ?>
        <input type="submit" class="btn btn-info" value="UPDATE" name="update_bill" >   
        <?php   if( isset($_POST['update_bill']) ){
$bill = mysqli_real_escape_string($conn, $_POST['bill']);
$sql =("UPDATE reception SET bill = '$bill' WHERE id = '$id' ");
$result = $conn->query($sql);
}
        ?>
    </div>
    </div>
</td>
</form>
</tr>
                      <?php }  ?> 
</table>
so on that table i have a form with input fields to be updated later after an encounter is completed, but no matter which record i select, it only updates the first one, is there any way i can update my query or code to be able to update records which i have chosen?
 
    