hip1/14.1.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> <style> table, td{ border: 1px solid } </style> </head> <body> <?php include('db.php'); $query = "select * from auteurs order by auteurnr"; $result = mysqli_query($db, $query); echo "<table><tr> <td>auteurnr</td> <td>voornaam</td> <td>voorletters</td> <td>tussenvoegsel</td> <td>achternaam</td> <td>geb_jaar</td> <td>sterfjaar</td> </tr>"; while($row = mysqli_fetch_array($result)){ echo "<tr> <td>$row[auteurnr]</td> <td>$row[voornaam]</td> <td>$row[voorletters]</td> <td>$row[tussenvoegsel]</td> <td>$row[achternaam]</td> <td>$row[geb_jaar]</td> <td>$row[sterfjaar]</td> </tr>"; } echo "</table>"; ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse