hip1/16.2/info.php

<?php setlocale (LC_ALL, 'nld_NLD'); include('../db.php'); $llnr = $_GET['llnr']; $boeknr = $_GET['boeknr']; if($llnr){ if($boeknr){ $query = "insert into reserveringen (boeknr, llnr, datum_reservering, kosten_betaald, status) values($boeknr, $llnr, '".strftime('%Y-%m-%d', time())."', 'N', 'open')"; mysqli_query($db, $query) or die(mysqli_error($db)); } $query = "select * from reserveringen r, boeken b, auteurs a where r.llnr = $llnr and b.boeknr = r.boeknr and b.auteurnr = a.auteurnr order by datum_reservering desc"; $result = mysqli_query($db, $query) or die(mysqli_error($db)); while($row=mysqli_fetch_array($result)){ echo "<div>$row[titel] - $row[achternaam] - ".strftime("%d/%m/%Y",strtotime($row['datum_reservering']))."</div>"; } } ?>

Resultaat

Made by Thijs Aarnoudse