I've a problem with PHP sessions. This is my code:
login.php
<?php
session_start();
...
...
...
$_SESSION['id'] = $user['id'];
$_SESSION['name'] = $user['nome'];
$_SESSION['ruolo'] = $user['ruolo'];
$_SESSION['auth'] = true;
header("location: index.php");
exit();
...
...
index.php
<?php
session_start();
var_dump($_SESSION);
...
...
?>
result is array(0) { }
I've already seen other similar posts, but no proposed solutions are helpful to me (session_start, exit after header, etc)
Some suggestions?