<?php
session_start();

// Check if data is received via POST
if (isset($_POST['admin_id']) && isset($_POST['user_id']) && isset($_POST['visitor_id'])) {
    $_SESSION['admin_id'] = $_POST['admin_id'];
    $_SESSION['user_id'] = $_POST['user_id'];
    $_SESSION['visitor_id'] = $_POST['visitor_id'];
   echo $_POST['visitor_id'];
    // Redirect to actual signin page
  header("Location: index.php"); // Change to your actual signin file if different
    exit();
} else {
    echo "Invalid session data.";
}

if (isset($_SESSION['admin_id']) && isset($_SESSION['user_id'])) {
    $_SESSION['admin_id'] = $_POST['admin_id'];
    $_SESSION['user_id'] = $_POST['user_id'];

    // Redirect to actual signin page
    header("Location:index.php"); // Change to your actual signin file if different
    exit();
} else {
    echo "Invalid session data.";
}
 
?>
