<?php

// Get tab_id from URL

$tabSessionID = $_GET['tab_id'] ?? '';



if (empty($tabSessionID)) {

    // Redirect if tab_id is invalid

    header("Location: index.php?error=2");

    exit();

}



// Close any previous session to prevent session locking issues

session_write_close();



// Start tab-specific session securely

session_id($tabSessionID);

session_name("guest_portal_" . $tabSessionID);

session_start();



?>

