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
|
<?php //Connection avec la BDD.
mysql_connect("localhost", "root", "");
mysql_select_db("cisco_sante");
$reponse = mysql_query("SELECT * FROM patients");
?>
<table width="800">
<tr>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">Date</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">IPM</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">Numéro</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">Nom</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">C</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">K</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">KR</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">V</th>
<th colspan="5" style="border-radius: 5px; background-color: #079839; height: 30px;">Montant</th>
</tr>
<?php //On affiche les lignes du tableau une à une à l'aide d'une boucle
while($donnees = mysql_fetch_array($reponse))
{
?>
<tr bgcolor="#CCCCCC" align="center">
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['date'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['ipm'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['numero'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['nom'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['c'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['k'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['kr'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['v'];?></td>
<td colspan="5" style="border-radius: 5px" scope="col"><?php echo $donnees['montant'];?></td>
</tr>
<?php
} //fin de la boucle, le tableau contient toute la BDD
mysql_close(); //deconnection de mysql
?>
</table> |
Partager