Commit | Line | Data |
---|---|---|
fb6aedc2 | 1 | <?php |
b5f60f89 | 2 | |
fb6aedc2 JB |
3 | function home() |
4 | { | |
b5f60f89 | 5 | global $connection; |
fb6aedc2 | 6 | |
fb6aedc2 JB |
7 | $requete = "SELECT NumCl, NomCl, CodePosteCl, VilleCl FROM CLIENTS"; |
8 | $result = $connection->query($requete); | |
9 | echo "<table border=1>\n"; | |
10 | echo "<tr><td>Code_CL</td><td>Nom</td><td>Rue</td><td>Ville</td></tr>\n"; | |
11 | while ($ligne = $result->fetch_row()) { | |
12 | $code = htmlentities($ligne[0]); | |
13 | $nom = htmlentities($ligne[1]); | |
14 | $rue = htmlentities($ligne[2]); | |
15 | $ville = htmlentities($ligne[3]); | |
16 | echo "<tr><td>$code</td><td>$nom</td><td>$rue</td><td>$ville</td></tr>\n"; | |
17 | } | |
18 | echo "</table>\n"; | |
19 | $result->close(); | |
fb6aedc2 JB |
20 | } |
21 | ||
22 | home(); | |
23 | ||
24 | ?> |