x108/I2_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>
</head>
<body>
<?php
include ('db.php');
$query = 'select * from boeken b, auteurs a where b.auteurnr = a.auteurnr';
$result = mysqli_query($db,$query) or die(mysqli_error($db));
while($row = mysqli_fetch_array($result)){
$datum = strtotime($row['pub_jaar']);
$datum = strftime('%Y', $datum);
echo "<div><a href=I2_2.php?boeknr=$row[boeknr]>$row[titel] $row[achternaam] $row[genre] | $datum</div>";
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse