bonjour à tous !
voilà, cela fait 1 mois que je suis bloqué par un message d'erreur , qui provient d'un code a priori bien implementer, après une boucle while , je stoke dans des variables des données bien précis. sauf les variables en questions sont reconnu comme undefined variabl($etp , $rep, $km) . quand je réecute la requete tout semble bon parfois
voici le code
voici le message d'erreur
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 <?php $idJeuEltsForfait = mysql_query($req, $idConnexion); if ( !$idJeuEltsForfait == '') $lgEltsForfait = mysql_fetch_assoc($idJeuEltsForfait); mysql_free_result($idJeuEltsForfait); mysql_close($idConnexion); while ((isset($lgEltsForfait))) { // On place la bonne valeur en fonction de l'identifiant de forfait switch ($lgEltsForfait['idfraisforfait']) { case "ETP": $etp = $lgEltsForfait['quantite']; break; case "KM": $km = $lgEltsForfait['quantite']; break; case "NUI": $nui = $lgEltsForfait['quantite']; break; case "REP": $rep = $lgEltsForfait['quantite']; break; } } } ?> </form> </form> <form> <p class="titre" /> <div style="clear:left;"> <h2>Frais au forfait </h2> </div> <table style="color:white;" border="1"> <tr> <th>Repas midi</th> <th>Nuitee </th> <th>Etape</th> <th>Km </th> <th>Situation</th> </tr> <tr align="center"> <td width="80" ><input type="text" size="3" name="repas"value="<?php if(!$rep =='') { echo $rep ;}?>" /></td> <td width="80"><input type="text" size="3" name="nuitee" value="<?php if(!$nui =='' ){ echo $nui ; }?>"/></td> <td width="80"><input type="text" size="3" name="etape"value="<?php if(!$etp =='') { echo $etp; } ?>"/></td> <td width="80"><input type="text" size="3" name="km"value="<?php if(!$km =='') {echo $km; }?>" /></td> <td width="80">
merci pour vos suggestion( ! ) Notice: Undefined variable: rep in C:\wamp\www\Application\cValidFichesFrais.php on line 121
Call Stack
# Time Memory Function Location
1 0.0029 283952 {main}( ) ..\cValidFichesFrais.php:0
" /> ( ! ) SCREAM: Error suppression ignored for ( ! ) Notice: Undefined variable: nui in C:\wamp\www\Application\cValidFichesFrais.php on line 122 Call Stack #TimeMemoryFunctionLocation 10.0029283952{main}( )..\cValidFichesFrais.php:0 "/> ( ! ) SCREAM: Error suppression ignored for ( ! ) Notice: Undefined variable: etp in C:\wamp\www\Application\cValidFichesFrais.php on line 123 Call Stack #TimeMemoryFunctionLocation 10.0029283
ce: Undefined variable: km in C:\wamp\www\Application\cValidFichesFrais.php on line 124 Call Stack #TimeMemoryFunctionLocation 10.0029283952{main}( )..\cValidFichesFrais.php:0 " />
Partager