diff --git a/index.php b/index.php
index 5e45407..33c18fe 100644
--- a/index.php
+++ b/index.php
@@ -1,15 +1,26 @@
checkTeamExists($team_id)) {
+ header("Location: puzzles.php?team=" . $team_id);
+ die();
+ }
+
+ else {
+ $stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
+ $stmt->execute();
+ $teams = $stmt->fetchAll();
+ }
}
// Sinon, on affiche la liste des équipes :
else {
- $database = new Database();
$stmt = $database->pdo_teams->prepare("SELECT * FROM teams");
$stmt->execute();
$teams = $stmt->fetchAll();
@@ -37,11 +48,10 @@
= $tr["home"]["message"]?>
-
+