<? $n = $_GET['n']; if (isset($n)==0) { $n = 1;} ?> <a href="fotos<? echo ++$n;?>.php?n=<?echo $n;?>">Siguiente Foto</a>