l102/grid.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>
body{
display: grid;
}
</style>
</head>
<body>
<?php
include ('db.php');
$query = "SELECT * FROM boeken";
$result = mysqli_query($db, $query);
echo "<table>";
while ($row = mysqli_fetch_array($result)) {
echo "
<tr>
<td>$row[titel] </td>
<td>$row[pub_jaar]</td>
<td>$row[genre]</td>
</tr>";
}
echo "\n </table>\n";
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse