1 2 3 4 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
|
$identifiant_de_connexion=$_POST['identifiant_de_connexion'];
$mot_de_passe_de_connexion=$_POST['mot_de_passe_de_connexion'];
$choix_service=$_POST['choix_service'];
if(empty($identifiant_de_connexion))
{
echo'Veuillez saisir votre identifiant de connexion.';
}
elseif(empty($mot_de_passe_de_connexion))
{
echo'Veuillez saisir votre mot de passe de connexion.';
}
elseif(empty($choix_service))
{
echo'Veuillez choisir un service.';
}
else
{
$base_de_donnees=mysql_connect('localhost','utilisateur','utilisateur');
mysql_select_db('systeme_gestion_du_magasin',$base_de_donnees);
$verification_authentification=mysql_query(SELECT * FROM $choix_du_service WHERE identifiant_de_connexion=$identifiant_de_connexion and mot_de_passe_de_connexion=$mot_de_passe_de_connexion);
if (!empty($verification_authentification)){echo'Authentification incorrecte';}
else {
$_SESSION['identifiant_de_connexion']=$identifiant_de_connexion;
$_SESSION['mot_de_passe_de_connexion']=$mot_de_passe_de_connexion;
$_SESSION['etc...']=$etc...;
//ICI FONCTION DE REDIRECTION VERS LA PAGE CORRESPONDANT A LA VALEUR $choix_du_service
} |
Partager