l204/coureur.php
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style/style.css">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<html><h1>coureurs</h1></html>
<table border="1">
<tr>
<th>coureurID</th>
<th>voornaam</th>
<th>Achternaam</th>
<th>nationaliteit</th>
<th>Geb_jaar</th>
<th>teamleiderID</th>
</tr>
<button onclick="location.href='Auto.php'">auto</button>
<button onclick="location.href='Resultaten.php'">resultaten</button>
<button onclick="location.href='Races.php'">races</button>
<button onclick="location.href='index.php'">homepagina</button>
<?php
include('db2.php');
$query = "SELECT * FROM coureur";
$result = mysqli_query($db, $query);
while($row = mysqli_fetch_array($result)) {
echo "<tr>";
echo "<td><a href='coureurdetails.php?CoureurID=" . $row['CoureurID'] . "'>{$row['CoureurID']}</td>";
echo "<td>{$row['Voornaam']}</td>";
echo "<td>{$row['Achternaam']}</td>";
echo "<td>{$row['Nationaliteit']}</td>";
echo "<td>{$row['Geb_jaar']}</td>";
echo "<td>{$row['TeamleiderID']}</td>";
echo "</tr>";
}
?>
</table>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse