para pasar la variable de este ejemplo
Código:
<a href="mostrar2.php?id=<?php echo $row['id'] & $listar ?>">MOSTRAR</th>
debería ser así:
Código:
<a href="mostrar2.php?id=<?php echo $row['id']."&variable_get=".$listar ?>">MOSTRAR</a></th>
ojo agregué &variable_get= y el cierre de "a" </a>
salu2