Bonjour à tous
J'ai un select qui contient la liste de catégories et sous catégories de différents services proposés.
Je voudrais que mon tableau qui contient la liste de services avec leurs détails se charge selon la valeur choisie dans select..
Code php : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13 <select id='select' name='select' onchange='...'> <option value=''>-----choisir-----</option> <?php foreach($this->categories as $item) { if($item->id_parent == 0) { ?> <option value="<?php echo $item->id ?>"><?php echo $item->categorie; ?></option> <?php } else{ ?> <option value="<?php echo $item->id ?>"><?php echo '-- '.$item->categorie; ?></option> <?php } } ?> </select>
Code php : 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 <table class="listeservices"> <thead> <tr> <th width="40">Id</th> <th width="100">Service</th> <th width="350">Description</th> </tr> </thead> <tbody> <?php foreach($this->listeservices as $services){ ?> <tr id="<?php echo $services->id_categorie; ?> "> <td><?php echo $services->id; ?></td> <td><?php echo $services->nom; ?></td> <td><?php echo $services->description; ?></td> </tr> <?php } ?> </tbody> </table>
Quelqu'un pourrait me guider svp?
Merci d'avance








Répondre avec citation



JavaScript
Partager