I am creating a PHP session using the following code:
<?php
session_start();
$_SESSION['loggedin'] = true;
?>
How can I access the variable loggedin
in Javascript? In other words, I want to check in Javascript if the variable 'loggedin'
is set or not.