Bonjour tout le monde.
j'ai cr�e une table Sql telle que (image jointe) :
J'ai cr�e un formulaire ou l'utilisateur choisit sa fili�re et apr�s le groupe .Le probl�me est que dans ma liste � d�rouler il me retourne tout les groupes cr�es alors que le but est de retourner les groupes sp�cifiques � la fili�re d�j� choisie dans le formulaire .
voici mon code :
Merci de votre aide.
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 <form id="form1" name="form1" method="post" action="modules2.php"> <table width="389" height="158" border="0"> <tr> </strong> <span class="style1"><strong>Ecole: </strong></span><strong> <label> <?php include("../config.php"); $sql=("SELECT DISTINCT filiere FROM filiere") or die ("erreur sql ".mysql_error()); $res = mysql_query($sql); ?> <select name="filiere" id="filiere"> <?php while ( $resultat = mysql_fetch_array($res)) {?> <option><?php echo $resultat['filiere']; ?></option> <?php } ?> </select> </label> </strong>(<span class="style2">*</span>)</p> <p align="left"><strong> </strong> <span class="style1"><strong>Groupe : </strong></span><strong> </strong><strong> <label> <?php include("../config.php"); $sql=("SELECT DISTINCT groupe FROM filiere ") or die ("erreur sql ".mysql_error()); $res = mysql_query($sql); ?> <select name="groupe" id="groupe"> <?php while ( $resultat = mysql_fetch_array($res)) {?> <option><?php echo $resultat['groupe']; ?></option> <?php } ?> </select> </label> </strong>(<span class="style2">*</span>)</p> <p align="left"><strong> </strong> <span class="style1"><strong>Niveau: </strong></span><strong> </strong><strong> <label> <?php include("../config.php"); $sql=("SELECT DISTINCT niveau FROM filiere") or die ("erreur sql ".mysql_error()); $res = mysql_query($sql); ?> <select name="niveau" id="niveau"> <?php while ( $resultat = mysql_fetch_array($res)) {?> <option><?php echo $resultat['niveau']; ?></option> <?php } ?>
Partager