<?php
session_start();
header('Content-Type: application/json');

error_log("Session Data: " . print_r($_SESSION, true)); // Log session data

if (!empty($_SESSION['user_id'])) {
    echo json_encode(["sId" => $_SESSION['user_id']]);
} else {
    echo json_encode(["error" => "User ID not set"]);
}
