<?php
require_once __DIR__ . '/../../connect.php';

$id = filterRequest("id");

$sql = "UPDATE `invitesToPassengers` SET `isGiftToken` = 1 WHERE `id` = :id";
$stmt = $con->prepare($sql);
$stmt->bindParam(':id', $id, PDO::PARAM_INT);
$stmt->execute();

if ($stmt->rowCount() > 0) {
    jsonSuccess(null, "Record updated successfully.");
} else {
    jsonError("No records were updated");
}
?>