prepare("SELECT * FROM ciudades WHERE id = :id"); $stmt->bindParam(':id', $ciudad_id, PDO::PARAM_INT); $stmt->execute(); $ciudad = $stmt->fetch(PDO::FETCH_ASSOC); if (!$ciudad) { $_SESSION['error_message'] = "Ciudad no encontrada."; header("Location: ciudades.php"); exit(); } } catch (PDOException $e) { $_SESSION['error_message'] = "Error de base de datos: " . $e->getMessage(); header("Location: ciudades.php"); exit(); } ?>
Datos de la Ciudad