Bonjour, j'ai un ptit souci.
J'ai un formulaire ou l'on check les application qu'on souhaite et ou on rentre notre login :
et ensuite cela l'envoi vers un autre formulaire qui doit recuperer les application checké par l'utilisateur :
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 <form action="form.php" method="post" name="monform"> <?php include("../Connections/connec.php"); mysql_select_db('satisfaction') or die('Erreur de selection '.mysql_error()); $result = mysql_query("SELECT nom_appli FROM appli"); while ($row = mysql_fetch_array($result)) { echo "<b>"; echo $row["nom_appli"]; echo " :</b>"; echo "<input type=\"checkbox\" name=\""; echo $row["nom_appli"]; echo "\"><br>"; } echo "</td><td align=\"right\">"; $result1 = mysql_query("SELECT nom_appli_fr FROM appli_fr"); while ($row = mysql_fetch_array($result1)) { echo "<b>"; echo $row["nom_appli_fr"]; echo " :</b>"; echo "<input type=\"checkbox\" name=\""; echo $row["nom_appli_fr"]; echo "\"><br>"; } echo "</td>"; mysql_close(); ?> </tr> </table> <br><br> <p align="center"><input name="login" type="text" /> <br> <button style="cursor:hand; background:navy; color:white; border:solid 1px black;" type="submit">Commencer</button></p> </form>
Voila, c'est a mon avis cette ligne la qui plante :
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 <form action="Add.php" method="post" name="monform2" onsubmit="return donneavis()"> <?php include("../Connections/connec.php"); mysql_select_db('satisfaction') or die('Erreur de selection '.mysql_error()); $result = mysql_query("SELECT nom_appli FROM appli"); while ($row = mysql_fetch_array($result)) { if(document.monform.$row["nom_appli"].checked==true) { echo "Pour l'application <b>"; echo $row["nom_appli"]; echo "</b> vous êtes :<br><br>"; echo "<table width=\"600\"> <tr> <td align=\"center\">"; echo " <button style=\"cursor:hand; background:crimson; color:white; border:solid 1px black;\" type=\"button\" disabled >Très insatisfait</button> </td>"; echo "<td align=\"center\"> <button style=\"cursor:hand; background:firebrick; color:white; border:solid 1px black;\" type=\"button\" disabled >Insatisfait</button> </td>"; echo "<td align=\"center\"> <button style=\"cursor:hand; background:tan; color:white; border:solid 1px black;\" type=\"button\" disabled >Moyen</button> </td>"; echo "<td align=\"center\"> <button style=\"cursor:hand; background:greenyellow; color:white; border:solid 1px black;\" type=\"button\" disabled >Bien</button> </td>"; echo "<td align=\"center\"> <button style=\"cursor:hand; background:forestgreen; color:white; border:solid 1px black;\" type=\"button\" disabled >Exellent</button> </td>"; echo "<td align=\"center\"> <button style=\"cursor:hand; background:grey; color:white; border:solid 1px black;\" type=\"button\" disabled >Non utilisé</button>"; echo "</td> </tr> <tr>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"1\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"2\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"3\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"4\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"5\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "<td align=\"center\"> <input type=\"radio\" value=\"NULL\" name=\""; echo $row["nom_appli"]; echo "\"></td>"; echo "</tr> </table> <br>"; } }
Cela ne doit pas etre la bonne syntaxe, il me met aucune erreur, mais le probleme c'est qu'il me met toutes les applications alors que je ne les ait pas toutes coché au formulaire precedent
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 if(document.monform.$row["nom_appli"].checked==true)
Partager