What is supposed to happen is that a row gets inserted into a table, then that row's id is selected by means of comparison of the name and surname of that particular entry.
The id returned is then inserted into another table:
$result = false;
$result = mysql_query("INSERT INTO `reunie` (`naam`, `van`,`nooiensvan`, `selfoon`, `email`, `bywoon`, `metgesel_naam`, `spesifieke_onderwysers`, `spesifieke_musiek`, `bydrae`, `voorstelle`) VALUES ('$naam','$van','$nooiensvan','$selfoon','$email','$bywoon','$metgesel','$spesifiekeOnderwysers','$musiek','$bydrae','$voorstelle')") or die(mysql_error());
// sleep in order for query to finish
while ($result === false) {
sleep(1);
}
$result = mysql_query("SELECT `id` FROM `reunie` WHERE `naam` = '$naam' AND `van` = '$van' ORDER BY `id` DESC LIMIT 1") or die(mysql_error());
// Edit
Thanks guys for the important comments. Thanks for teaching me a few important points.