<?php
include($_SERVER['DOCUMENT_ROOT'] . "/API-Others/connection/conn.php");
$authCode = isset($_GET['authCode']) ? $_GET['authCode'] : '';

$query = "SELECT * FROM users WHERE authCode = '$authCode'";
$result = mysqli_query($conn, $query);
$rowCount = mysqli_num_rows($result);
if ($rowCount > 0) {
    $postData = array();
    while ($row = mysqli_fetch_assoc($result)) {
        $postData[] = $row;
        $userID = $row["unique_user_id"];
}
} 


$resultData = array('code' => $authCode, 'message' => $statusMessage, 'data' => $postData, 'userID' => $userID);

echo json_encode($resultData);
?>