Bonjour à tous ;

voilà je suis confronté à un problème ; que j'ai dû mal à trouver ; je ne sais pas mais la table qui est créé à l'intérieur d'une boucle résultant d'un requête ne s'affiche pas comme il faut pour venir sur le principal problème j'ai mis le bout de code en question :
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
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
 
<?php
// des paremetres à afficher 
 $clienthabit ="Baby ouassa";
 $numPolice =  "AA028769";
 $utilisateur = 2;
 $etatdossier =1;
 $typePaie=2;
 $numeroClient=1887;
 $revision =0;
 $compagnie = "Generali france";
 $fraction ="Annuel";
 $dateeffet="2002-08-29 00:00:00";
 $datecreation="2002-08-29 00:00:00 ";
 $perteDate="";
 $avenan="";
 $prix = 0 ;
 $indice1=0 ;
 $gestiontype=2;
 $etat2="Aucun";
 $echeance="2007-08-29 00:00:00 ";
 $resiliation="";
 $visite1="";
 $contratype=117;
 $police1="Multirique habitation";
 $policestate=1;
 $coderecherche=10298;
 
 
 
 
 
?>
  <!-- ********************************** le probleme commence ici **************************************************** -->
 
 
              <fieldset class="police">
                <legend>Police</legend>
                <table border="1">
 
 
	       <tbody>
                    <tr>
                        <td>Police </td>
                    <td>
 
                        <?php
                       if(isset ($police1)){
                            echo  $police1;
                        }
 
 
                        ?>
 
                    </td>
 
                       <td>Contrat soumis R&eacute;vision</td>
                   <td colspan="4">
               <?php
 
 
                     if(isset ($revision)){
 
 
                       if($revision==0)
                      {
                        echo" <input type=\"checkbox\" name=\"complet\"  /> ";
                  }
                  else
                      {
                       echo" <input type=\"checkbox\" name=\"complet\" checked =\"true\"/>";
                  }
 
                     }
 
               ?>
 
                       </td>
 
                 </tr>
 
 
 
 
            <?php
                       // insertion au serveur
 
$cnx = odbc_connect("DSN_carann","root","")or die ("impossible de se connecter a la base");
 
  $sql =" select * from [POLPoliceMultirisquehabitation] as Pol where Pol.Codepolice=$coderecherche";
 
 
 
 
 
     // execution de la requete
 
     $requete = odbc_do($cnx,$sql)or die (odbc_error());
 
 
         while ($Habit=odbc_fetch_object($requete))
             {
 
      ?>
 
 
                    <tr>
 
                     <?php // echo  $revision; ?>
 
                   <!--     <td>Contrat:</td>  ici même en mettant çà çà ne s'affiche pas -->
 
 
                 <?php
 
                 // probleme type de contrat
                     if(isset($contratype)){
                          echo" <td> <label> Contrat: </label></td>";
 
       $cont = "select Nom from POLCTRContrat where CodeCTRContrat like'$contratype'";
                 $req = odbc_do($cnx,$cont)or die (odbc_error());
 
 
         while ($contract=odbc_fetch_object($req))
             {
                          // echo $Auto->Typedecontrat;
 
                         echo" <td> <label>".$contract->Nom."</label></td>";
             }
 
 
      //    echo " <label for=\"bonusAncien\"> Type de contrat:</label>";
       //            echo"<td>"."<b>".$Habit->Typedecontrat."</td>"."</b>"."<br />";
 
         //        echo "<br />";
              }
 
              ?>
 
 
 
                 <td>Compagnie:</td>
 
 
                 <td colspan="3">
                  <?php
                 if(isset ($compagnie)){
                       echo $compagnie; 
                 }
 
 
                 ?> </td>
 
 
                        <td>Paiement</td>
 
                        <td>
                           <?php
                           if(isset ($fraction)){
                                 echo $fraction; 
                           }
 
                           ?>
 
                         </td>
                    </tr>
                   <tr>
                       <td>Date cr&eacute;ation</td>
 
                       <td>
                   <?php   
 
                   require ("fonction.php");
 
                   if(!empty($datecreation)){
                        datefr($datecreation);
                   }
 
 
                 //  echo"<td>"."<b>".$datecreation."</b>"."</td>";
 
                   ?>
 
                      </td>
 
                        <td>Date perte</td>
 
                        <td>
                   <?php
 
                      if(!empty($perteDate)){
                          datefr($perteDate);
 
 
                      }
 
 
 
                 //  echo "<td>".$perteDate."</td>"; ?>
 
                         </td>
 
                        <td>Avenants</td>
 
                        <td>
                     <?php
 
                     if(isset ($avenan)){
                      echo $avenan;
                     }
 
 
                     ?>
                      </td>
                        <td>Prime TTC</td>
 
                        <td>
                    <?php
                    if(isset ($prix)){
                        echo floatval($prix);
                    }
               //     echo "<td>"."<b>".floatval($prix)."</b>"."</td>";
                    ?>
                      </td>
 
                    </tr>
                    <tr>
 
                    <td>Num&eacute;ro</td>
                    <td>
                    <?php 
                    if(isset ($numPolice)){
                            echo $numPolice;           
                    }
 
                    ?>
                     </td>
 
                        <td>Date effet:</td>
 
                        <td>
                        <?php
                        if(!empty ($dateeffet)){
                            datefr($dateeffet);
                        }
                       // echo"<td>"."<b>".$datecreation."</b>"."</td>";
                        ?>
                        </td>
 
                        <td>Indice:</td>
                        <td>
                        <?php
 
                        if(isset ($indice1)){
                             echo $indice1;
                        }
 
                        ?>
                         </td>
 
                        <td>Gestion:</td>
 
                        <td>
 
 
                   <?php
 
                    if(isset ($gestiontype))
                        {
                        switch($gestiontype){
 
							case 0 :
 
							 echo 'Inconnue';
 
							break ;
 
							case 1:
							   echo 'Confi&eacute;e';
							break;
 
							case 2:
							     echo 'Non Confi&eacute;e';
							break ;
						}
                      }
                 ?>
 
                      </td>
 
               </tr>
                    <tr>
 
                   <td>Etat</td>
 
                   <td>
                      <?php
 
                 if(isset ($policestate)){
 
                   $demandeetat = "select  Etatdelapolice from [Etats des polices] where NumEtat like '$policestate' ";
 
                    $requeteetat = odbc_do($cnx,$demandeetat)or die (odbc_error());
 
 
         while ($etatpolice=odbc_fetch_object($requeteetat))
             {
                          // echo $Auto->Typedecontrat;
 
                    echo $etatpolice->Etatdelapolice;
 
             }
 
 
 
 
 
 
 
                 }
 
                      ?>
 
              </td>
 
                      <td>Date &eacute;cheance</td>
 
                      <td>
 
                <?php
 
                if(!empty ($echeance)){
 
                    datefr($echeance);
 
 
                }
 
 
                ?>
 
                 </td>
 
                       <td>Relance</td>
 
                        <td>ici relance a determiner</td>
 
                        <td>Apporteur:</td>
           <td>Aucun: a determiner</td>
 
               </tr>
               <tr>
 
                    <td>Cont:</td>
                    <td>
                      <?php 
 
                      if(isset ($etat2)){
                         echo $etat2 ;   
                      }
 
 
 
                      ?>
                     </td>
 
                      <td>R&eacute;s./susp</td>
 
                      <td>
                      <?php 
                       if(!empty($resiliation)){
 
                           datefr($resiliation);
 
                       }
 
 
                      ?>
                      </td>
 
                       <td>Historique:</td>
 
                       <td>
                       <?php 
                       echo 'A determiner' ;
                       ?>
                       </td>
 
                      <td>Commercial:</td>
                      <td>ici Commercial(a calculer) </td>
 
 
                  </tr>
                </tbody>
 
 
 
 
 
                    </table>
                    </fieldset>
 
 
        <?php
 
 
           }
         ?>
le resultat c'est qu'il n'affiche pas cette table Police où plus exactement il affiche mais seulement une partie
voici le resultat
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
 
 
 
 
<html>
 
    <head>
        <title>Multirisque Habitation </title>
 
       <!--  <link  rel="stylesheet"media="screen"type="text/css"title="mon style"href="habit.css"/> -->
 
    </head>
 
    <body>
 
 
 
 
 
           <body>
 
 
                   <fieldset class="general">
                <legend>G&eacute;n&eacute;ral </legend>
 
                <label class="gen">Client:</label>
 
                <label class="valeur">
             Baby ouassa                 </label><br />
 
 
 
                 <label class="gen">Cabinet:</label>
 
                            <label class="valeur">
 
 
            Michel Bihou&eacute;e
                                </label> <br />
 
                                <label class="gen"> Dossier Complet:</label>
            <input type="checkbox" name="complet" checked="true" />
 
                 <br />
 
                 <label class="gen">Type de paiement :</label>
 
               <label class="valeur">
 
 
           Encaissement cabinet (ch&egrave;que)
                   </label>
 
 
               <br />
               <label class="gen">Num&eacute;ro client :</label>
 
 
                                 <label id="numclient">
 
 
					1887                                       </label>
 
 
 
 
 
 
 
 
 
 
 
 
              </fieldset>
 
 
 
 
              <fieldset class="police">
                <legend>Police</legend>
                <table border="1">
 
 
	       <tbody>
 
                    <tr>
                        <td>Police </td>
                    <td>
 
                        Multirique habitation
                    </td>
 
                       <td>Contrat soumis R&eacute;vision</td>
                   <td colspan="4">
 
                <input type="checkbox" name="complet"  /> 
                       </td>
 
                 </tr>
 
 
 
 
 
 
 
               </tbody>
    </table> <br />
 
 
 
 
 </body>
      </html>

je vous remercie d'avance mes amis ; je débute et je suis un peu perdu