-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcontrolc.php
More file actions
35 lines (27 loc) · 1.13 KB
/
Copy pathcontrolc.php
File metadata and controls
35 lines (27 loc) · 1.13 KB
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
30
31
32
33
34
35
<?php session_start(); ?>
<?php
include 'include/database.php';
global $db;
if (isset($_POST['connexion'])) {
extract($_POST);
$q = $db -> query('SELECT * FROM utilisateur');
if(null!=(trim($login)) AND null!=(trim($pass)) AND null!=(trim($profil)) ){
while ($d = $q -> fetch()) {
if ($login == $d['Login'] AND $pass == $d['Mot_de_passe'] AND $profil == $d['Type'] ) {
$_SESSION['cpt']=0;
$_SESSION['login'] = $login;
if ($profil == 'Prestataire') {
header('Location: accueilGestionnaire.php');
}elseif ($profil == 'Client') {
header('Location: accueilClient.php');
}
}else{
$erreur= "Veuillez verifier vos informations";
}
}
}else{
$erreur= "Veuillez verifier vos informations";
}
$q -> closeCursor();
}
?>