prepare("UPDATE special_promotions SET name = ?, description = ?, discount_type = ?, discount_value = ?, start_date = ?, end_date = ?, is_active = ? WHERE id = ?"); $stmt->execute([$name, $description, $discount_type, $discount_value, $start_date, $end_date, $is_active, $promotion_id]); header('Location: promotions.php'); exit; } $stmt = db()->prepare("SELECT * FROM special_promotions WHERE id = ?"); $stmt->execute([$promotion_id]); $promotion = $stmt->fetch(); ?>