Collect day, month, and year values from a user form, merge them into a single date string, and pass it to a PDO SQL query for filtering reservations.
<?php
if (isset($_POST['proceed'])) {
$monInput = trim($_POST['mon']);
$dayInput = trim($_POST['day']);
$yrInput = trim($_POST['yr']);
$combinedDate = $yrInput . '-' . $monInput . '-' . $dayInput;
$stmt = $db->prepare("SELECT id, title FROM bookings WHERE booking_date = :date");
$stmt->bindParam(':date', $combinedDate);
$stmt->execute();
}
?>