x103/J2_2.php

<?php include "db.php"; $achternaam = $_GET["achternaam"]; $result = mysqli_query($db, "SELECT * FROM leerlingen WHERE achternaam LIKE ('%$achternaam%')"); while($row = mysqli_fetch_array($result)){ echo "<tr>"; for($i = 0; $i < count($row)/2; $i++){ echo "<td>$row[$i]</td>"; } echo "</tr>"; } ?>

Resultaat

Made by Thijs Aarnoudse