PHP session variables stopped work
<p>I'm having problem with my session variables. Few days ago it was working. I'm on mamp 3.5 and php 7.0 (on a mac). My website is working fine it's only a computer problem.
On windows everything works but on my mac, when I login he create a session variable, but on the next page the session variable is empty.</p>

<p>On my friend's computer (on mac too) it didn't work...</p>

<p>Here's my login code :</p>

<pre><code>&lt;form method="post" action="connexion_prof.php" id="formulaire" name="formulaire" novalidate&gt;
      &lt;label for="Identifiant"&gt;Identifiant :&lt;/label&gt;
      &lt;input type="text" class="form-control" id="identifiant" name="identifiant" required data-validation-required-message="Entrer un identifiant."&gt;

      &lt;label for="Mdp"&gt;Mot de passe :&lt;/label&gt;
      &lt;input type="password" class="form-control" id="mdp" name="mdp" required data-validation-required-message="Entrer un mot de passe."&gt;

      &lt;input type="checkbox" name="cookie" id="cookie"/&gt; &lt;label for="cookie"&gt;Se souvenir de moi.&lt;/label&gt;

      &lt;input type="submit" id="connexion" name="Connexion" value="Connexion" class="btn btn-primary"&gt;
&lt;/form&gt;
</code></pre>

<p>And here's my connexion_prof.php code :</p>

<pre><code>$db = mysqli_connect('localhost', 'root', 'root'); 
mysqli_select_db($db,'Projet') or die(mysqli_error()); 
</code></pre>

<p>And :</p>

<pre><code>$sql = "select Password, Statut, Nom, Prenom, ID, Statut from User where Username='".$identifiant."'";
$req = mysqli_query($db, $sql) or die('Erreur SQL !&lt;br&gt;'.$sql.'&lt;br&gt;'.mysqli_error());

$data = mysqli_fetch_assoc($req);
$_SESSION['Username'] = $identifiant;
$_SESSION['Nom'] = $data['Nom'];
$_SESSION['Prenom'] = $data['Prenom'];
$_SESSION['id'] = $data['ID'];
$_SESSION['Statut'] = $data['Statut'];
</code></pre>