bonjour j'aimerais faire des requetes via listes deroulantes mais la requete vient avec un tableau vide si vous m'aidez a revoir mon code . le probleme en ai que quand je selectionne un par exemple je recherche tous ceux qui sont en reseaux ca ne vient pas , tous ceux qui sont en developpement et bases de données non plus . mais quand je selectionne reseaux et experience ca vient . je ne sais pas pourquoi quand je selectionne uniquement reseaux ou developpement ou bases de données ca ne vient pas
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 <?php $connection= mysql_connect ("localhost" , "root" ,""); $db="cv"; mysql_select_db ($db, $connection); if (isset( $_POST['specialite'])and isset($_POST['experience'])) { $choi1 = $_POST['specialite']; $choi2 = $_POST['experience']; $requete1 = mysql_query("SELECT * FROM personne where specialite='".$choi1."' AND experience='".$choi2."'" ); //$requete2 = mysql_query("SELECT * FROM personne where experience='".$choi2."'") or die("erreur de SQL); echo "<table border='1'>"; echo "<tr> <th>NOM</th> <th>PRENOMS</th> <th>EMAIL</th> <th>AGE</th> <th>MENTION</th> <th>NATIONALITE</th> <th>TELEPHONE</th> </tr>"; while ($row = mysql_fetch_array($requete1)) { echo "<tr>"; echo "<td>".$row['nom']."</td>"; echo "<td>".$row['prenoms']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>".$row['age']."</td>"; echo "<td>".$row['mention']."</td>"; echo "<td>".$row['nationalite']."</td>"; echo "<td>".$row['telephone']."</td>"; echo "</tr>"; } echo "</table>"; } else{ if (isset( $_POST['mention'])) { $choi = $_POST['mention']; $requete = mysql_query("SELECT * FROM personne where experience='".$choi."'"); echo "<table border='1'>"; echo "<tr> <th>NOM</th> <th>PRENOMS</th> <th>EMAIL</th> <th>AGE</th> <th>SPECIALITE</th> <th>NATIONALITE</th> <th>TELEPHONE</th> </tr>"; while ($row = mysql_fetch_array($requete, MYSQL_ASSOC)) { echo "<tr>"; echo "<td>".$row['nom']."</td>"; echo "<td>".$row['prenoms']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>".$row['age']."</td>"; echo "<td>".$row['specialite']."</td>"; echo "<td>".$row['nationalite']."</td>"; echo "<td>".$row['telephone']."</td>"; echo "</tr>"; } echo "</table>"; } } else { if ( isset( $_POST['specialite'])) { $choix = $_POST['specialite']; $requete = mysql_query("SELECT * FROM personne where specialite='".$choix."'"); echo "<table border='1'>"; echo "<tr> <th>NOM</th> <th>PRENOMS</th> <th>EMAIL</th> <th>AGE</th> <th>MENTION</th> <th>NOMBRES D'ANNEES EXPERIENCE </th> <th>NATIONALITE</th> <th>TELEPHONE</th> </tr>"; while ($row = mysql_fetch_array($requete, MYSQL_ASSOC)) { echo "<tr>"; echo "<td>".$row['nom']."</td>"; echo "<td>".$row['prenoms']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>".$row['age']."</td>"; echo "<td>".$row['mention']."</td>"; echo "<td>".$row['experience']."</td>"; echo "<td>".$row['nationalite']."</td>"; echo "<td>".$row['telephone']."</td>"; echo "</tr>"; } echo "</table>"; } } else{ if (isset ( $_POST['experience'])) { $choi = $_POST['experience']; $requete = mysql_query("SELECT * FROM personne where experience='".$choi."'"); echo "<table border='1'>"; echo "<tr> <th>NOM</th> <th>PRENOMS</th> <th>EMAIL</th> <th>AGE</th> <th>MENTION</th> <th>SPECIALITE </th> <th>NATIONALITE</th> <th>TELEPHONE</th> </tr>"; while ($row = mysql_fetch_array($requete, MYSQL_ASSOC)) { echo "<tr>"; echo "<td>".$row['nom']."</td>"; echo "<td>".$row['prenoms']."</td>"; echo "<td>".$row['email']."</td>"; echo "<td>".$row['age']."</td>"; echo "<td>".$row['mention']."</td>"; echo "<td>".$row['specialite']."</td>"; echo "<td>".$row['nationalite']."</td>"; echo "<td>".$row['telephone']."</td>"; echo "</tr>"; } echo "</table>"; } } ?>
Partager