j'ai en train de réaliser un formulaire remplit par les utilisateurs et stockés au BD . j'ai ajouter une condition au champ CIN( lorsque un utilisateur saisit leur CIN en texte il obtient un message d'erreur qui s'affiche "Vérifier votre Numéro de CIN" )

le probléme que cet erreur n'affiche pas dans ma page php mais aprés le clique sur le bouton "submit" il affiche une page blanche.

voila mon code:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
include('config.php');
$erreur='';
 
if(isset($_POST['submit']))
{
   if(!empty($_POST['nom']) && !empty($_POST['prenom']) && !empty($_POST['CIN']) && !empty($_POST['tel']) && !empty($_POST['etatcivil']) && 
    !empty($_POST['dateN']) && !empty($_POST['sexe']) && !empty($_POST['situation']) && !empty($_POST['nbreenfants']) && !empty($_POST['adresse']) &&  !empty($_POST['ville']) && !empty($_POST['email']))
	 {
      $nom=htmlspecialchars(trim($_POST['nom']));
	  $prenom=htmlspecialchars(trim($_POST['prenom']));
 
	  //vérifier si le CIN est un nbre entier
	  if(!is_int($_POST['CIN'])){
	 $erreur="Vérifier votre Numéro de CIN";
	   return false;
	   } 
	   $CIN=htmlspecialchars(trim($_POST['CIN']));
	   $tel=htmlspecialchars(trim($_POST['tel']));
	   $etatcivil=htmlspecialchars(trim($_POST['etatcivil']));
	   $dateN=htmlspecialchars(trim($_POST['dateN']));
	   $sexe=$_POST['sexe'];
	    $situation=$_POST['situation'];
		 $nbreenfants=htmlspecialchars(trim($_POST['nbreenfants']));
		 $adresse=htmlspecialchars(trim($_POST['adresse']));
		  $ville=$_POST['ville'];
		  $email=htmlspecialchars(trim($_POST['email']));
 
		  // la requete d'exécution
		  $request=mysql_query("INSERT INTO employees(nom,prenom,CIN,tel,etatcivil,dateN,sexe,situation,nbreenfants,adresse,ville,email)
		  VALUES('$nom','$prenom','$CIN','$tel','$etatcivil','$dateN','$sexe','$situation','$nbreenfants','$adresse','$ville','$email')")  
		  or die (mysql_error());
 
		  die('Votre profil est bien  enregistré');
 
	 } else {$erreur="il faut remplir tous les champs";}
} 
 
    // affichage de tableau
	$req=mysql_query("SELECT * FROM employees") or die(mysql_error());
?>
 
<html>
<head>
<title>Profil</title>
<link rel="shortcut icon" href="css/images/favicon.ico" />
<link href="css/template_style.css" type="text/css" rel="stylesheet" /> 
</head> 
 
<body> 
 
<div id="templatemo_header_wrapper">
	<div id="templatemo_header">
    	<div id="logo"><a href="index_emp.html" ></a></div>
        <p id="intro_text">Suspendisse at justo in felis ultricies cursus. Quisque risus sed lacus pharetra sit amet pretium lacus aliquet. Sed commodo tellus dictum et lacinia sem.</p>
        <a class="intro_bg_by" href="index_emp.html" title="images"  target="_blank"><img src="images/templatemo_background.png" alt="images" /></a>    </div>
</div>
<p id="erreur">
<div id="templatemo_main_wrapper">
	<div id="templatemo_main">
		<div id="content"> 
            <div id="home" class="section">
 
<p id="erreur">	<?php if(isset($erreur) !='') echo $erreur;?></p>
 
			 <a href="login.php" class="close">close</a><a href="index_emp.html" class="home_btn">home</a>
			<center>
			<fieldset><legend align="center" ><font size="+1" color="#000000" face="Times New Roman, Times, serif">Remplir / Modifier Votre PV</font> </legend>
  <table cellpadding="1">
<form name="f1" method="post">
<div id="texts">
<td>nom: </td><td><input type="text" name="nom"/></td>
</tr>
<tr>
<td>Prenom:</td> <td><input type="text" name="prenom" /></td>
</tr>
<tr>
<td>CIN:</td> <td><input type="text" name="CIN" maxlength="8"/></td>
</tr>
<tr>
<td>N° tel:</td> <td><input type="text" name="tel" maxlength="8" /></td>
</tr>
<tr>
<td>Etat Civil:</td> <td><input type="text" name="etatcivil" /></td>
</tr>
<tr>
<td>
date Naissance:</td> <td><input type="text" size="1"name="dateN" maxlength="2"/> <input type="text" size="1" maxlength="2" name="dateN" /> 
<input type="text" size="4" maxlength="4" name="dateN"/></td>
</tr>
<tr>
<td> sexe:</td> <td>homme<input type="radio" name="sexe" value="H"/> femme<input type="radio"  name="sexe" value="H" />  </td>
</tr>
<td>Situation:</td><td><select name="situation">
<option></option>
<option>marié</option>
<option>En couple</option>
<option>veuf</option>
<option>celibataire</option>
<option> divorcé</option>
<option>fiancé</option>
<option>séparé</option>
</select>
<tr>
<td>Nombre D'Enfants:</td> <td><input type="text" name="nbreenfants" /></td>
</tr>
<tr>
<tr>
<td> Adresse:</td> <td><textarea rows="5" cols="20" name="adresse"></textarea></td>
</tr>
<tr>
<td>ville:</td><td><select name="ville">
<option></option>
<option>nabeul</option>
<option>sousse</option>
<option>tunis</option>
<option>bizerte</option>
<option>jandouba</option>
<option>mounastir</option>
</select>
 </td>
</tr>
<tr>
<td> E-mail:</td> <td><input type="text"  name="email" onFocus="if(this.value=='exemples@gmail.com'){this.value=''}"  onblur="if(this.value==''){ (this.value='exemples@gmail.com')}"  value="exemples@gmail.com"/></b></td></div>
</tr> <td></td>
<tr>
</tr> 
<tr><td></td>
</tr> <td></td>
<tr>
<td><center> <input type="submit" value="envoyer" name="submit" class="btn"/></center></td><td> <center><input type="reset" name="annuler" value="annuler"/></center></td>
</tr>
</form>
</table>
 
</fieldset>
 </center>           
 
            </div> 
        </div> 
    </div>
</div>
 
 
<div id="templatemo_footer_wrapper">
    </div>
</div>
</body>
</html>
j'ai besoin de quelqu'un de m'aidé a afficher l'erreur dans ma page et merci