prepare('SELECT * FROM users WHERE pseudo=?'); $req->execute(array($_POST['pseudo'])); $reponce=$req->fetch(); if($reponce != null){ if($reponce['mdp']===$_POST['mdp']){ $_SESSION['session_id'] = $reponce['ID']; $_SESSION['session_mdp'] = $reponce['mdp']; header('Location:index.php?i=0'); }else{ header('Location:login.php?i=2'); } }else{ header('Location:login.php?i=1'); } $req->closeCursor(); ?>