Y algo más sencillo de este tipo no te serviría?
Código PHP:
<a href="editar.php?id=<?php echo $reg['id']; ?>" target="_blank">editar</a>
Y en editar.php recoger las variables por GET así:
Código PHP:
$id = $_GET['id'];
Era algo así o te he entendido mal?