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 43 44 45 46 47 48 49 50 51 52 53
| <?php
$conn= mysql_connect('Localhost','root','');
$con= mysql_select_db('basecous',$conn);
if(isset($_POST['connexion']) && $_POST['connexion'] == 'Connexion')
{
if(
(isset($_POST['login']) && !empty($_POST['login']))&&
(isset($_POST['pwd']) && !empty($_POST['pwd']))
)
{
$req1 = mysql_query('SELECT * FROM utilisateur WHERE login == "'.$_POST['login'].'"') or die ('Erreur 10 <br/>'.mysql_error);
$data = mysql_fetch_array($req1);
if((count($data) > 1) && ($_POST['pwd'] == $data['motdepasse']) )
{
include('menu.php');
}
else
{
$msg = 'L'identifant ou le mot de passe est incorrect';
echo $msg;
}
}
else
{
$msg = 'Veillez entrer l'identifant et le mot de passe';
}
}
?>
<html>
<body>
<table align='center'>
<tr align='center'>
<td colspan='2'><font color='green'size='10px'>Authentification</font></td>
</tr>
<tr>
<form method='POST' action='gedconnexion.php'>
<td> <font color='red' size='5px'>Votre login :</font></td>
<td> <input type="text" name="login"/></td>
</tr>
<tr>
<td><font color='red' size='5px'> Votre mot de passe :</font> </td>
<td><input type="password" name="pwd"/></td>
</tr>
<tr>
<td align='center'><input type="submit" name="connexion" value="Connexion"/></td>
<td align='center'><input type="submit" name="quitter" value="Quitter"/></td>
</tr>
</form>
</table></body></html> |
Partager