diff --git a/add_club.php b/add_club.php index 09943aa..2815c65 100644 --- a/add_club.php +++ b/add_club.php @@ -11,6 +11,8 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { $number = $_POST['number'] ?? ''; $neighborhood = $_POST['neighborhood'] ?? ''; $city = $_POST['city'] ?? ''; + $phone = $_POST['phone'] ?? ''; + $email = $_POST['email'] ?? ''; $description = $_POST['description'] ?? ''; if (empty($club_name) || empty($address) || empty($city)) { @@ -19,9 +21,9 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { try { $pdo = db(); $stmt = $pdo->prepare( - 'INSERT INTO clubs (name, address, number, neighborhood, city, description) VALUES (?, ?, ?, ?, ?, ?)' + 'INSERT INTO clubs (name, address, number, neighborhood, city, phone, email, description) VALUES (?, ?, ?, ?, ?, ?, ?, ?)' ); - $stmt->execute([$club_name, $address, $number, $neighborhood, $city, $description]); + $stmt->execute([$club_name, $address, $number, $neighborhood, $city, $phone, $email, $description]); $success_message = 'Club \'' . htmlspecialchars($club_name) . '\' has been added successfully!'; } catch (PDOException $e) { $error_message = 'Database error: ' . $e->getMessage(); @@ -92,13 +94,23 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { +