8d481333
lwadbled
add(html): Codes ...
|
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
$identifiant = mysqli_real_escape_string($db,htmlspecialchars($_POST['identifiant']));
$mdp = mysqli_real_escape_string($db,htmlspecialchars($_POST['mdp']));
if($identifiant !=="" && $mdp !== ""){
$requete = "SELECT count(*) FROM utilisateur WHERE
login = '".$identifiant."' AND mdp = '".$mdp."' ";
$exec_requete = mysqli_query($db,$requete);
$reponse = mysqli_fetch_array($exec_requete);
$count = $reponse['count(*)'];
if($count!=0){
$_SESSION['identifiant'] = $identifiant;
echo "<meta http-equiv=\"refresh\" content=\"0;url=menu.php\">";
//header('Location : menu.php');
}else{
echo "<meta http-equiv=\"refresh\" content=\"0;url=index.html\">";
//header('Location : index.html');
}
}else{
echo "<meta http-equiv=\"refresh\" content=\"0;url=index.html\">";
//header('Location : index.html');
}
mysqli_close($db); // Fin de la connexion
}else{
//header('Location : /index.html');
echo "<meta http-equiv=\"refresh\" content=\"0;url=index.html\">";
}
?>
|