Évènements

Créer un évènement'; echo ''; } else if ($role == 'Sportif') { echo ''; echo ''; echo ''; } else { echo ''; } echo ''; } else { echo ''; } // faire une requete sql avec mysqli permettant d'afficher tous les évènements // afficher les évènements sous forme de tableau // voici les colonnes disponibles dans la table event // id title description event_type date location role guest_count creator $query = "SELECT * FROM event"; if (isset($_GET['sort'])) { $sort = $_GET['sort']; switch ($sort) { case 'date': $query .= " ORDER BY date"; break; case 'location': $query .= " ORDER BY location"; break; case 'discipline': $query .= " ORDER BY event_type"; break; default: break; } } // Menu déroulant pour sélectionner le tri echo "
"; echo ""; echo ""; echo "
"; $result = mysqli_query($db, $query); echo "
"; echo "
"; echo ""; echo ""; // En-tête du tableau echo ""; echo ""; // Ensure class name matches with the CSS echo ""; // Ensure class name matches with the CSS echo ""; // Ensure class name matches with the CSS echo ""; // Ensure class name matches with the CSS echo ""; // Ensure class name matches with the CSS echo ""; echo ""; echo ""; // The scrollable body class removed here if not necessary while ($row = mysqli_fetch_array($result)) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; } echo ""; echo "
TitreDescriptionDisciplineDateLieu
" . htmlspecialchars($row['title']) . "" . htmlspecialchars($row['description']) . "" . htmlspecialchars($row['event_type']) . "" . htmlspecialchars($row['date']) . "" . htmlspecialchars($row['location']) . "
"; echo "
"; echo "
"; ?>