Bonjour a tous
J'aimerais comprendre comment remplir une liste déroulante avec données d'une table de ma base (Table école qui me sort la liste des écoles) !
Juste en bas j'ai ma liste déroulante que je rempli pour le moment manuellement.
Ma Vue :
Code html : 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 <h1>RECHERCHE PAR LE NOM COMPLET</h1> <br></br> <form action=" " method="POST"> <label>Choississez l'Ecole : </label><SELECT name="monecole" size="1"> <OPTION>ecole 1 <OPTION selected>ecole 2 <OPTION>ecole 3 <OPTION>ecole 4 <OPTION>ecole 5 </SELECT> <input type="submit" value="rechercher"/> </form> <?php if($this->tMESINFORMATIONS):?> <h2>Liste des résultats</h2> <table class="tb_list"> <tr> <th>Nom Ecole</th> <th>Matricule</th> <th>Nom</th> <th>Prenoms</th> <th>Né(e) le</th> <th>Lieu</th> <th>Niveau</th> <th>Filière</th> <th>Ufr</th> <th>Année</th> </tr> <?php foreach($this->tMESINFORMATIONS as $oMESINFORMATIONS):?> <tr> <th><?php echo $oMESINFORMATIONS->PROJETNOM ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP1 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP2 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP3 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP4 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP5 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP6 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP7 ?></th> <th><?php echo $oMESINFORMATIONS->CHAMP8 ?></th> <th><?php echo $oMESINFORMATIONS->EXOENCOURS ?></th> </tr> <?php endforeach;?> </table> <?php elseif(_root::getRequest()->isPost()):?> <h2>Liste des Résultats</h2> <p>Pas de Résultats</p> <?php endif;?>
Merci à tous !
Partager