prepare('UPDATE venues SET name = ?, description = ?, capacity = ?, features = ? WHERE id = ?'); $stmt->execute([$name, $description, $capacity, $features, $venue_id]); header("Location: venues.php?success=3"); exit; } catch (PDOException $e) { $errorMessage = "Error: Could not update the venue. " . $e->getMessage(); } } } // Fetch the venue to edit $venue = null; try { $pdo = db(); $stmt = $pdo->prepare('SELECT * FROM venues WHERE id = ?'); $stmt->execute([$venue_id]); $venue = $stmt->fetch(PDO::FETCH_ASSOC); } catch (PDOException $e) { $errorMessage = "Error: Could not fetch venue details."; } if (!$venue) { header("Location: venues.php"); exit; } ?> Edit Venue - The Best Events

Edit Venue

Cancel