Skip to content
Extraits de code Groupes Projets
Valider 9e3b5a52 rédigé par Etienne BRATEAU's avatar Etienne BRATEAU
Parcourir les fichiers

login

parent 00085e0b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -16,7 +16,7 @@ require_once 'header.php'; ...@@ -16,7 +16,7 @@ require_once 'header.php';
?> ?>
</nav> </nav>
<?php var_dump($_SESSION); ?>
<div> <div>
</div> </div>
......
...@@ -16,6 +16,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login'] ...@@ -16,6 +16,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login']
$_SESSION['id'] = $user->getId(); $_SESSION['id'] = $user->getId();
$_SESSION['type'] = $user->getType(); $_SESSION['type'] = $user->getType();
} }
else
{
header('Location: index.php?err=3');
}
} }
catch(Exception $e) catch(Exception $e)
{ {
...@@ -28,6 +32,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login'] ...@@ -28,6 +32,10 @@ if(isset($_POST['login']) && isset($_POST['password']) && !empty($_POST['login']
$_SESSION['id'] = $user->getId(); $_SESSION['id'] = $user->getId();
$_SESSION['type'] = $user->getType(); $_SESSION['type'] = $user->getType();
} }
else
{
header('Location: index.php?err=2');
}
} }
catch(Exception $e){ catch(Exception $e){
header('Location: index.php?err=2'); header('Location: index.php?err=2');
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter