'', 'title' => '', 'summary' => '', 'distance_km' => '', 'duration_hours' => '', 'difficulty' => 'Moderate', 'neighborhood' => '', 'start_point' => '', 'highlights' => '', 'map_url' => '', 'best_for' => '', ]; if ($_SERVER['REQUEST_METHOD'] === 'POST') { $result = urban_hikes_create($_POST); if (!empty($result['success'])) { urban_hikes_set_flash('success', 'Route saved and published to the directory.'); header('Location: route.php?id=' . (int)$result['id']); exit; } $errors = $result['errors'] ?? []; $formData = array_merge($formData, $result['input'] ?? []); } $latestRoutes = urban_hikes_latest(); $pageTitle = 'Add a route | ' . urban_hikes_project_name(); $pageDescription = 'Add an urban hiking route with city, difficulty, distance, highlights, and map link.'; urban_hikes_render_head($pageTitle, $pageDescription, 'noindex, follow'); urban_hikes_render_nav('admin'); ?>
Content admin

Add a new urban route

This first admin screen keeps the workflow small: add a route once, then browse it in the public directory immediately.

Enter one stop or viewpoint per line.
Back to directory
Workflow

What this first slice covers

  • Add a route with the key planning fields
  • Store it in MariaDB with prepared statements
  • Redirect to a detail page with a confirmation toast
  • See it in the public directory immediately
Latest entries

Recent routes

Open directory

No routes published yet.

Route City View
ยท km
Open