I'm Trying this:
<a href="
<?php
$fh = fopen($p['n'].php, 'w') or die("Can't create file");
if($fh)
{
$code ="
<?php
//codigo combinado con html nada complejo incluí php para manejar sesiones
?>";
echo fwrite($file,$code);
fclose($file);
}?>"></a>
The problem is that it evaluates the code within $code
instead of just passing it as a string