<?php
include('../include/pay_connection.php');

$uid = $_GET['uid'];
$status = $_GET['status'];

if (isset($uid) && isset($status)) {
    $status = intval($status); // Convert status to integer
    $sql = "UPDATE `users` SET `kyc_status` = '$status' WHERE `user_id` = '$uid'";
    $result = mysqli_query($link, $sql);

    if ($result) {
        echo "KYC status updated successfully";
    } else {
        echo "Error updating KYC status: " . mysqli_error($link);
    }
}
?>
