I1_1.php

<?php include "db.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> <style> td{ border: 1px solid black; } </style> </head> <body> <table> <?php $result = mysqli_query($db, "SELECT voornaam, tussenvoegsel, achternaam, geb_jaar, sterfjaar, auteurnr FROM auteurs"); while($row = mysqli_fetch_array($result)){ echo "<tr>"; for($i = 0; $i < 5; $i++){ if($i == 0){ echo "<td><a href='I1_2.php?auteurnr=$row[5]'>$row[$i]</td>"; } else{ echo "<td>$row[$i]</td>"; } } echo "</tr>"; } ?> </table> </body> </html>

Resultaat

Made by Thijs Aarnoudse