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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
|
<html>
<head>
<meta http-equiv="Content-Language" content="fr">
<meta name="GENERATOR" content="Microsoft FrontPage 5.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Nouvelle page 1</title>
<meta name="Microsoft Theme" content="blends 011, default">
</head>
<body>
<form method="POST" name="formulaire" action="donnees.php">
<div align="center">
<center>
<table border="0" cellspacing="1" style="border-collapse: collapse" width="61%" height="292">
<tr>
<td width="23%" height="24"><b>N°immatr</b></td>
<td width="79%" height="24">:<input type="text" name="i_id" size="20"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Nom</b></td>
<td width="79%" height="24">:<input type="text" name="n_nom" size="20"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Prénom</b></td>
<td width="79%" height="24">:<input type="text" name="p_prenom" size="20"></td>
</tr>
<tr>
<td width="23%" height="24"><b>N°CIN</b></td>
<td width="79%" height="24">:<input type="text" name="c_cin" size="20"></td>
</tr>
<tr>
<td width="23%" height="20"><b>Sit.Familiale</b></td>
<td width="79%" height="20">:<select size="1" name="s_sit">
<option>Célibataire</option>
<option>Marié</option>
</select></td>
</tr>
<tr>
<td width="23%" height="24"><b>Adresse</b></td>
<td width="79%" height="24">:<input type="text" name="a_adresse" size="55"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Code Postal</b></td>
<td width="79%" height="24">:<input type="text" name="c_postal" size="12"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Ville</b></td>
<td width="79%" height="24">:<input type="text" name="v_ville" size="20"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Téléphone</b></td>
<td width="79%" height="24">:<input type="text" name="t_tele" size="20"></td>
</tr>
<tr>
<td width="23%" height="24"><b>E-mail</b></td>
<td width="79%" height="24">:<input type="text" name="e_email" size="29"></td>
</tr>
<tr>
<td width="23%" height="24"><b>Emploi</b></td>
<td width="79%" height="24">:<select size="1" name="e_emploi">
<option>Maçon</option>
<option>Ouvrier</option>
<option>Soudeur</option>
<option>Ferrailleur</option>
<option>Gardien</option>
</select></td>
</tr>
<tr>
<td width="23%" height="27"><b>État</b></td>
<td width="79%" height="27">:<select size="1" name="e_etat">
<option>Provisoire</option>
<option>Permanent</option>
</select></td>
</tr>
<tr>
<td width="23%" height="29"><b>Entré le</b></td>
<td width="79%" height="29">:<input type="text" name="e_entre" size="14"></td>
</tr>
<tr>
<td width="23%" height="29"> </td>
<td width="79%" height="29">
<!--webbot bot="SaveResults" U-File="_private/form_results.csv" S-Format="TEXT/CSV" S-Label-Fields="TRUE" --><p>
<input type="submit" value="Envoyer" name="B1"></p>
</form>
</td>
</tr>
</table>
</center>
</div>
<p> </p>
<?php
//récupération et traitement des valeurs :
$id = $_POST['i_id'];
$nom = $_POST['n_nom'];
$prenom = $_POST['p_prenom'];
$cin = $_POST['c_cin'];
$sit = $_POST['s_sit'];
$adresse = $_POST['a_adresse'];
$codepostal = $_POST['c_postal'];
$ville = $_POST['v_ville'];
$tele = $_POST['t_tele'];
$email = $_POST['e_email'];
$emploi = $_POST['e_emploi'];
$etat = $_POST['e_etat'];
$entre = $_POST['e_entre'];
$connexion = mysql_connect("localhost","root","");
$base = mysql_select_db("GestionDePaie");
// On ajoute une entrée avec mysql_query
$requete = mysql_query("INSERT INTO salaries VALUES('$id', '$nom', '$prenom', '$cin','$sit','$adresse','$codepostal','$ville','$tele','$email','$emploi','$etat','$entre')");
//mysql_query("INSERT INTO salaries VALUES('".$id."', '".$nom."', '".$prenom."', '".$cin."','".$sit."','".$adresse."','".$codepostal."','".$ville."','".$tele."','".$email."','".$emploi."','".$etat."','".$entre."')");
?>
</body>
</html> |
Partager