<!-- Bevat het filter form waarmee je kan kiezen welke informatie je wilt zien -->
<?php

    $lab = $db->prepare("SELECT label, label_id FROM Labels");
    $lab->execute();
    $labels = $lab->fetchAll(PDO::FETCH_ASSOC);

    echo '
        <div id="filters">
            <div class="filter_vak"><span>Event title</span><input name="filter_event_title" id="filter_event_title" type="text"/></div>
                <span class="dropdown-doelgroep">
                    <div class="filter_vak labels_filter">Label V';

                    echo '<div class="doelgroepen_filter">';

                        // Loopt door alle labels in de database en laat ze in een dropdown menu zien.
                        foreach ($labels as $key => $value) {
                            echo '<div class="doelgroep_edit_filter">
                                        <input class="label_id" type="hidden" name="label_filters[]" value="' . $value['label_id'] . '">' . $value['label'] . '
                                        <input class="label_selected" type="hidden" name="label_filters_selected[]" value="">
                                  </div>';
                        }

                        echo '</div>

                    </div>
                </span>


            <div class="filter_vak"><span>Date</span><input name="filter_datum" id="filter_datum" type="date"/></div>
            <input onclick="formSubmit(this)" type="submit" name="submit" id="submit_filters" value="filter"/>
        </div>
        <div id="filters_opties"><span>+</span></div>';

?>
