M1.php

<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>M1</title> <script> function setEvents(){ document.getElementbyId().onchange = setAuteurs; } function setAuteurs(){ var auteurnr = this.options[this.selectedIndex].value; ajax('M1.php?auteurnr=' + auteurnr, 'auteurdetails'); } </script> </head> <body> <?php include('db.php'); $query = "select * from auteurs"; $result = mysqli_query($db, $query) or die(mysqli_error($db)); echo "<form action='' method='get'>"; echo "" ?> <div id='auteurdetails'></div> </body> </html>

Resultaat

Made by Thijs Aarnoudse