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

Edit Vendor

Cancel