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
|
<?php
$connexion=mysql_connect('localhost','root',"");
$db=mysql_select_db('bdd');
echo '<p>Choisissez une heure:</p>';
echo"<form name='form1' action=",$_SERVER['PHP_SELF']," method='POST'>";
echo '<select name="heure" id="toto">';
$resultat=mysql_query("select * from miniprojet");
while ($ligne=mysql_fetch_array($resultat))
{
echo '<option>'.$ligne["heure"].'</option>';
}
echo '</select>';
echo '<input type="submit" value="Afficher" name="Afficher">';
echo '</form>';
$ligne=$ligne["heure"];
//Les lignes suivantes affichent le détail d'un adhérent
// si l'utilisateur en a choisi un
$ligne2 = mysql_query("Select * from miniprojet where heure=".$ligne);
echo ' <b>Heure : </b>'.$ligne2['heure'].' <br>Temporisation du feu 1'.$ligne2['V1'].'<br>Temporisation du feu 2 '.$ligne2['V2'].'';
mysql_close();
?> |
Partager