x108/K3.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 auteurs a'; $result = mysqli_query($db,$query) or die(mysqli_error($db)); echo "<form action='' method='get'>"; echo "<select name='auteurnr'"; while ($row = mysqli_fetch_array($result)){ $auteurnr = $row['auteurnr']; echo "<option value='$auteurnr'>$row[voornaam] $row[tussenvoegsel] $row[achternaam]</option>"; } echo "</select>"; echo "<input type='submit' value='Selecteer'>"; echo "</form>"; ?> </body> </html>

Resultaat

Made by Thijs Aarnoudse