prepare("INSERT INTO tournaments (name) VALUES (?)");
$stmt->execute([$tournamentName]);
$message = '
Tournament created successfully!
';
} catch (PDOException $e) {
$message = 'Error: ' . $e->getMessage() . '
';
}
}
}
// Fetch all tournaments
$tournamentsStmt = db()->query("SELECT * FROM tournaments ORDER BY start_date DESC");
$tournaments = $tournamentsStmt->fetchAll();
?>
0): ?>
-
- No tournaments found.