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
| <?php
if(isset($_POST['submit']))
{
$nomass = htmlentities (trim ($_POST['nomass']));
$preass = htmlentities (trim ($_POST['preass']));
$nomconj = htmlentities (trim ($_POST['nomconj']));
$preconj = htmlentities (trim ($_POST['preconj']));
$nbreenft = htmlentities (trim ($_POST['nbreenft']));
if (($nomass<>'') AND ($preass<>'') AND ($nomass<>'') AND ($preconj<>'') AND ($nbreenft<>'') )
{ $log = mysql_query ("SELECT * FROM assure WHERE nomprojet='$nomprojet' ");
$cols = mysql_num_rows($log);
if($cols==0)
{
mysql_query ("INSERT INTO assure (idass, nomass, preass, nomconj, preconj, nbreenft) VALUES ('', '$nomass', '$preass', '$nomconj', '$preconj', '$nbreenft') ");
die (" <br/>Les données saisies ont été bien enregistrées. <a href='donneedebaseprojet.php'> <strong> Précédent </strong> </a> <a href='donneedebasesection.html'> <strong> Suivant </strong> </a>");
} else "Ce projet existe déjà !!! Veuillez consulter la liste des <a href='#'> <strong> projets déjà réalisés. </strong> </a>";
}else echo "Veuillez renseigner tous les champs SVP.";
}
?>
<form method="post" action="enregistrement_infos.php">
<p>
<table border="1" align="center">
<tr> <th>NOM ASSURE(E) </th>
<td><input type="text" name="nomass" id="nomass" size="32" maxlength="255" /> </td>
</tr>
<tr> <th>PRENOMS ASSURE(E) </th>
<td><input type="text" name="preass" id="preass" size="32" maxlength="255" /> </td>
</tr>
<tr> <th>NOM CONJOINT(E) </th>
<td><input type="text" name="nomconj" id="nomconj" size="32" maxlength="255" /> </td>
</tr>
<tr> <th>PRENOMS CONJOINT(E) </th>
<td><input type="text" name="preconj" id="preconj" size="32" maxlength="255" /> </td>
</tr>
<tr> <td colspan="">NOMBRE D'ENFANTS</td>
<td><input type="text" name="nbreenft" id="nbreenft" size="10" maxlength="2" /> </td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="VALIDER" name="submit" id="boutonvalider" /> </td>
</tr>
</table>
</p>
</form> |
Partager