hip1/14.8/uitleningen.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');
include('timestuff.php');
$llnr = $_GET['llnr'];
$queryName = "select *
from leerlingen
where llnr = $llnr";
$resultName = mysqli_query($db, $queryName) or die(mysqli_error($db));
$rowName = mysqli_fetch_array($resultName);
echo "<h2>$rowName[voornaam] $rowName[achternaam]</h2>";
$query = "select voornaam, achternaam, titel, datum_uit, a.auteurnr
from uitleningen u, boeken b, auteurs a
where u.llnr = $llnr and u.boeknr = b.boeknr and b.auteurnr = a.auteurnr
order by datum_uit";
$result = mysqli_query($db, $query) or die(mysqli_error($db));
while($row = mysqli_fetch_array($result)){
$date = converttime($row['datum_uit']);
echo "<h4> $row[titel]</h4>
<div>Auteur: <a href='auteurs.php?auteurnr=$row[auteurnr]'>$row[voornaam] $row[achternaam]</a></div>
<div>Uitleendatum: $date</div>";
}
?>
</body>
</html>
Resultaat
Made by Thijs Aarnoudse