| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 
 | <select style="width:250px" class="select2 puissance" id="puissanceVeh" name="puissanceVeh" onchange="calculKM();">
    <option></option>    
<?php
//Requete qui sélectionne les indications sur les taux
$req5 = "Select id AS puissaceV, tarif, indication
    From puissance
    Order by tarif";
//Exécution de la requête
$res5 = $connexion->query($req5);
//Tant qu'il y a des enregistrements, on les affiche
while($row5 = $res5->fetch()):
    if($row5['puissaceV'] == $puissanceVeh):
?>
    <option value="<?php echo $row5['puissaceV'] ?>" selected="selected"><?php echo $row5['indication']; ?></option>
    <input type="hidden" id="puissanceTarif" name="puissanceTarif" value="<?php echo $row5['tarif']; ?>"/> 
<?php
    else: 
?>
    <option value="<?php echo $row5['puissaceV']?>"><?php echo $row5['indication']; ?></option> 
    <input type="hidden" id="puissanceTarif" name="puissanceTarif" value="<?php echo $row5['tarif']; ?>"/> 
<?php
    endif;
endwhile;   
?>    
</select> | 
Partager