["min_range" => 1]])) { $errors[] = 'Duration must be a positive number.'; } if (!filter_var($price, FILTER_VALIDATE_INT, ["options" => ["min_range" => 0]])) { $errors[] = 'Price must be a non-negative number.'; } if (empty($errors)) { try { $pdo = db(); $sql = "INSERT INTO tour_packages (name, destination, duration_days, price, description, image_url) VALUES (?, ?, ?, ?, ?, ?)"; $stmt = $pdo->prepare($sql); // Using a placeholder image for now $placeholder_image = 'assets/images/tour_placeholder.png'; $stmt->execute([$name, $destination, $duration_days, $price, $description, $placeholder_image]); header("Location: admin_tours.php?success=1"); exit; } catch (PDOException $e) { $errors[] = "Database error: " . $e->getMessage(); } } } require_once 'includes/admin_sidebar.php'; ?>

Add New Tour Package

Fill out the form to add a new tour package.

Tour Package Details


Cancel