-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestlog.php
More file actions
23 lines (22 loc) · 857 Bytes
/
testlog.php
File metadata and controls
23 lines (22 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php
//ICI ON RECUPERE LES VALEURS QUI SONT DANS LA FORMULAIRE
$Login=$_POST['Login'];
$Password=$_POST['Password'];
//ICI ON ENTRE DANS LA BASE DE DONNEES
$Login=stripcslashes($Login);
$Password=stripcslashes($Password);
$Login=mysql_real_escape_string($Login);
$Password=mysql_real_escape_string($Password);
//ICI ON CONNECTE DANS LE SERVEUR ET ON CHOISI LA BASE DE DONNEES
mysql_connect("localhost","root", "");
mysql_select_db("gestion");
//ICI ON RELI LA BASE DE DONNEES AVEC SON UTILISATEUR
$result=msql_query("select * from user where Login='$Login' and Password='$Password'")
or die ("failed to query database".mysql_error());
$row=mysql_fetch_array($result);
if($row ['Login']==$Login && $row ['Password']==$Password){
echo "Login Success !!! Welcome" .$row ['Login'];
}else{
echo "Login et ou Password incorrect";
}
?>