
<?php
include "../../connect.php";
$id = filterRequest("id");
$balance = filterRequest("balance");

$sql = "UPDATE `passengerWallet` SET `balance` = '$balance' WHERE `id` = '$id'";
$stmt = $con->prepare($sql);
$stmt->execute();

if ($stmt->rowCount() > 0) {
    // Print a success message
    printSuccess($message = "Wallet record updated successfully");
} else {
    // Print a failure message
    printFailure($message = "Failed to update wallet record");
}
?>