prepare("DELETE FROM inversiones WHERE id = ?"); $stmt->execute([$id]); header('Location: inversiones_operativas.php?success=deleted'); exit; } catch (PDOException $e) { header('Location: inversiones_operativas.php?error=db_error'); exit; } ?>