prepare("SELECT id, title, description, start_date, end_date, registration_link FROM competitions ORDER BY start_date DESC"); $stmt->execute(); $competitions = $stmt->fetchAll(PDO::FETCH_ASSOC); } catch (Exception $e) { // If query fails, show friendly message (we enabled display_errors during debug) die("Database query failed: " . htmlspecialchars($e->getMessage())); } // include header (will not start a new session because header uses safe check) include __DIR__ . '/includes/header.php'; ?>
No competitions right now. Check back later.
| Title | Description | Start | End |
|---|---|---|---|