Sort By
CURDATE() ORDER BY date ASC"; $result = $conn->query($sql); if ($result->num_rows > 0) { // Loop through each row while ($row = $result->fetch_assoc()) { $event_id = $row['event_id']; $date = $row['date']; $time = $row['time']; $name = $row['name']; $image = $row['image']; $description = $row['description']; $feature = $row['feature']; $location = $row['location']; $type = $row['type']; $promo = $row['promo']; // Determine the badge text based on the status $badge_text = 'OPEN DAY'; // Output the HTML structure with dynamic data echo '
' . $name . '
' . $location . '
' . $name . '

' . $feature . '

' . $description . '

  • ' . convertDate($date) . '
  • ' . $time . '
'; } } else { echo "No events available."; } // Close connection $conn->close(); ?>
×