Session Diagnostic"; echo "Counter: " . $_SESSION['test_counter'] . " (Refresh to see if it increases)
"; echo "Session ID: " . session_id() . "
"; echo "HTTPS: " . (isset($_SERVER['HTTPS']) ? $_SERVER['HTTPS'] : 'off') . "
"; echo "SameSite: " . (session_get_cookie_params()['samesite'] ?? 'Not set') . "
"; echo "
"; echo "

If the counter doesn't increase on refresh:

"; echo "Your browser is likely blocking the session cookie because the preview is in an iframe. "; echo "I have set SameSite=None; Secure which should fix this, but some browsers require extra permissions or have strict privacy settings."; echo "

Click here to Refresh"; echo "

Go to Login";