Évènements à $location pour les $role" . "s" . "";
if ($role == 'Administrateur') {
$query = "SELECT * FROM event WHERE location = '$location'";
} else {
$query = "SELECT * FROM event WHERE location = '$location' AND role LIKE '%$role%'";
}
$result = mysqli_query($db, $query);
echo "
";
if ($role == 'Administrateur') {
$query = "SELECT * FROM event WHERE date = '$date'";
} else {
$query = "SELECT * FROM event WHERE date = '$date' AND role LIKE '%$role%'";
}
$result = mysqli_query($db, $query);
echo "
";
if ($role != 'Administrateur') {
echo "";
}
if ($role == 'Sportif') {
echo "";
}
echo "
";
}
} else {
echo "
Aucun évènement trouvé à la date recherchée.
";
}
echo "
";
}
if (isset($_GET['title'])) {
$title = $_GET['title'];
echo "
Évènement intitulé \"$title\"
";
if ($role == 'Administrateur') {
$query = "SELECT * FROM event WHERE title = '$title'";
} else {
$query = "SELECT * FROM event WHERE title = '$title' AND role LIKE '%$role%'";
}
$result = mysqli_query($db, $query);
echo "