Connexion
= htmlspecialchars($error) ?>
prepare("SELECT * FROM utilisateur WHERE login=?"); $stmt->execute([$login]); $user=$stmt->fetch(); if($user && password_verify($password,$user['password'])){ $_SESSION['user_id']=$user['id']; $_SESSION['user_login']=$user['login']; header('Location: admin.php'); exit; } else { $error='Identifiants incorrects.'; } } ?>