Skip to content
Snippets Groups Projects
Commit 8f331d80 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

redirection si connecté

parent 58f149ec
Branches
No related tags found
No related merge requests found
<?php
// On redirige si l'utilisateur est déjà connecté
if(isset($_SESSION['userId'])){
header('Location: /');
}
?>
<!DOCTYPE html>
<html>
......@@ -102,6 +108,9 @@
message: json.success,
status: "success"
});
setTimeout(function(){
window.location.href = '/';
}, 5000);
}else{
SnackBar({
message: json.error,
......
<?php
// On redirige si l'utilisateur est déjà connecté
if(isset($_SESSION['userId'])){
header('Location: /');
}
?>
<!DOCTYPE html>
<html>
......@@ -195,6 +201,10 @@
message: json.success,
status: "success"
});
// On redirige après 5s
setTimeout(function(){
window.location.href = '/login';
}, 5000);
}else{
SnackBar({
message: json.error,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment