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 36 37 38 39 40 41 42
| <form method="post">
<center><font color="#FF0000"><h3>S'authentifier</h3>
<fieldset class="fil1">
<b><font color="#000066">Pseudo:<input type="text" name="user" class="input_text" /><br />
<b><font color="#000066">Mot de passe:<input type="password" name="passe" class="input_text" /><br/><align="center"><colspan="2"><input type="submit" name="connecter" value="Connexion" class="buton_au" /><br/>
</table>
</form>
<?php
if(isset($_POST['connecter']))
{
$user=$_POST['user'];
$passe=$_POST['passe'];
if($user=="" || $passe=="")
{
echo "<center><b style='color:#F00;'>Vérifier vos champs svp!!!</b></center>";
}
else
{
include("connexion.php");
$rq_au=("SELECT * FROM utilisateur where user='$user' and passe='$passe'");
$res_au=mysql_query($rq_au) or die ("erreur au" .mysql_error());
$res2=mysql_num_rows($res_au);
if($res2)
{
header("Location: directeur_dipartement");
session_start();
$_SESSION['user']=$user;
$_SESSION['passe']=$passe;
}
else
{
echo "<center><b style='color:#F00;'>Vos identifiants sont incorrects!!!</b></center>";
}
}
}
?>
</fieldset> |