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
| <?php
include ('connection.php');
$login=$_POST['login'];
$retour = mysql_query("SELECT * FROM admin WHERE nom='$login'");
while ($donnees = mysql_fetch_array($retour))
{
if($donnees['mdp']==$_POST['mdp'])
{
echo 'connection réussite';
header("Location: /admin/index_admin.php");
exit();
}
else
{
echo 'Probleme de connection, réessayez';
}
}
?>
<p>
<form method="POST" action="index.php?page=admin" enctype="multipart/form-data">
<fieldset>
<legend>Identification</legend>
<p>
<label>Entrez votre nom : </label><input type="texte" name="login" />
</p>
<p>
<label>Entrez votre mot de passe : </label><input type="password" name="mdp" />
</p>
<input type="submit" value="Valider" />
</fieldset>
</form>
</p> |