cuisine/controleurs/cConnexion.php
Timothée Huneau 4c71fb59b4 Initial commit
Création de tous les dossiers et fichiers avec mise à part des constantes
2023-04-11 19:11:26 +02:00

23 lines
No EOL
303 B
PHP

<?php
$typePage = 0;
if(isset($_POST['motdepasse'])){
if(crypt($_POST['motdepasse'],SEL) == HASHED_PASSWORD){
$typePage = 1;
$_SESSION['auth'] = true;
}
else{
$typePage = -1;
}
}
if(isset($_POST['deconnexion'])){
$_SESSION['auth'] = false;
}
if($_SESSION['auth']){
$typePage = 1;
}
?>