I have some problems with the list that should be displayed on the page.
This is what is currently displayed on the page.
Students
- Student 3
01-02-2016 from 08:30 a.m. to 2:30 p.m. - Student
01-06-2016 from 10:30 a.m. to 3:30 p.m. - Student 1
01-08-2016 from 05:30 to 16:30. - Student 3
03-05-2016 from 08:30 a.m. to 10:30 a.m. - Student 2
01-1-2016 from 13:30 to 18:30. - Student 1
01-02-2016 from 16:30 to 20:30.
It should look like this:
Students
:
<div id="preferences">
<h2>Leerlingen</h2>
<?php
$sql2 = "SELECT leerlingen.firstname, leerlingen.lastname,
voorkeuren.start, voorkeuren.end, voorkeuren.title FROM
leerlingen JOIN voorkeuren ON leerlingen.uid=voorkeuren.title";
$result2 = $db->query($sql2);
while ($row = $result2->fetch_assoc()) {
?>
<ul>
<li><h4><?= $row['firstname'] . " " . $row['lastname'];?></h4></li>
<?= "Van " . date('j-m-Y H:i', strtotime($row['start'])) . " tot " . date('H:i', strtotime($row['end'])) ?>
</ul>
<?php
}
?>
</div>
, , , .