I try to use the same session variable I created in localhost/project/underpages/page.php in localhost/project/index.php.
But if I check with var_dump it says null so there must be something wrong.
page.php
<?php
session_start();
$_SESSION['loggedin'] = true;
header("Location: ../index.php?logged-in");
?>
index.php
<?php
session_start();
var_dump $_SESSION['loggedin'];
?>
I thougt now must be written true and not null.
Can someone help me? Thank you