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
| <?php
session_start();
echo "<center>";
$x=mysql_connect('localhost','root','');
mysql_select_db('projet',$x);
$v1=$_POST['Login'];
$v2=$_POST['Password'];
$trouv=0;
$req="select * from authentification";
$res=mysql_query($req);
while($lig=mysql_fetch_array($res))
{
if($lig['Login']==$v1 && $lig['Password']==$v2)
{
$trouv=1;
}
}
if($trouv==0)
{
echo "<script>alert(\"erreur\")</script>";
header("location:index.html");
}
else
{ echo"vous etes connecté<br>";
header("location:indexx.php");
}
?> |
Partager