H3.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 leerlingen"; $result = mysqli_query($db, $query) or die(mysqli_error($db)); while($row = mysqli_fetch_array($result)){ echo"$row[voornaam]"; echo "<br/>"; $llnr = $row['llnr']; $queryU = "select * from uitleningen u, boeken b where u.llnr = $llnr and u.boeknr = b.boeknr"; $resultU = mysqli_query($db, $queryU) or die(mysqli_error($db)); while ($rowU = mysqli_fetch_array($resultU)){ echo "$rowU[titel] $rowU[datum_uit]"; echo"<br/>"; } echo"<br/>"; } ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse