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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
| <?
mysql_connect("localhost", "admin", "admin");
mysql_select_db("keinfor");
if (isset($_POST['mat_emp']) AND isset($_POST['nom_emp']) AND isset($_POST['prenom_emp']) AND isset($_POST['login_emp']) AND isset($_POST['mdp_session_emp']) AND isset($_POST['mdp_crypto_emp']) AND isset($_POST['adresse_mess_emp']) AND isset($_POST['mdp_mess_emp']) AND isset($_POST['mdp_bios_emp']))
{
{
$mat_emp = htmlentities ($_POST['mat_emp']);
$nom_emp = htmlentities ($_POST['nom_emp']);
$prenom_emp = htmlentities ($_POST['prenom_emp']);
$login_emp = htmlentities ($_POST['login_emp']);
$mdp_session_emp = htmlentities ($_POST['mdp_session_emp']);
$mdp_crypto_emp = htmlentities ($_POST['mdp_crypto_emp']);
$adresse_mess_emp = htmlentities ($_POST['adresse_mess_emp']);
$mdp_mess_emp = htmlentities ($_POST['mdp_mess_emp']);
$mdp_bios_emp = htmlentities ($_POST['mdp_bios_emp']);
if(mysql_query("INSERT INTO employe VALUES('$mat_emp','$nom_emp','$prenom_emp','$login_emp',' $mdp_session_emp','$mdp_crypto_emp','$adresse_mess_emp','$mdp_mess_emp','$mdp_bios_emp')"))
{
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" " http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
<head>
<title>Gestion du parc informatique de Kea & Partners</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" media="screen" type="text/css" title="format" href="styles/format.css" />
</head>
<body class="page">
<h1 align="center"><img src="images/logo.gif" width="200" height="70"></h1>
<h2 align="center"><i><b> Gestion du parc informatique de Kea & Partners </i></b></h2>
<hr>
<br>
<A HREF="index.htm"> Acceuil </A> >
<br>
<br>
<h2>la ligne suivante a bien été rajoutée</h2>
<?
$reponse = mysql_query("SELECT * FROM employe WHERE mat_emp='$mat_emp'");
while($donnees = mysql_fetch_array($reponse) )
{
?>
<table border=0>
<col valing=left width=300>
<td><td>Matricule: <b><? echo $donnees['mat_emp']; ?></b></td></td><tr><td> Nom : <? echo $donnees['nom_emp'];?></td><tr><td> Prénom: <? echo $donnees['prenom_emp'];?></td><tr>?><td>Login: <? echo $donnees['login_emp']; ?></td><tr><td> Mot de passe session : <? echo $donnees['mdp_session_emp'];?></td><tr><td> Mot de passe CRYPTO:<? echo $donnees['mdp_crypto_emp'];?></td><tr><td>Adresse de messagerie: <? echo $donnees['adresse_mess_emp']; ?></td><tr><td> Mot de passe d'adresse de messagerie : <? echo $donnees['mdp_mess_emp'];?></td><tr><td> Mot de passe Bios: <? echo $donnees['mdp_bios_emp'];
?></table>
</body>
</html>
<? }
else
echo "le matricule existe déja";
}
}
else
echo "champ vide";
}
?> |
Partager