AHORA.. SI NO FUNCIONA ME SUICIDO
Código PHP:
$st=$foto1;
$img="paginas/".$id.".jpg";
if (file_exists($st) and $st==$img){
$n="";
$s="<img src=".$st." height='111' width='147'/>";
}
elseif (file_exists($st) and $st!=$img){
$n="";
$s=$st;}
no entiendo para que pusiste los primeros IF..
pusiste
if (foto="paginas/".$id.".pdf")
ahi estas diciendo que foto adquiere el valor paginas/".$id.".pdf ..
pa mi .. no tiene sentido.
cual es tu idea en esos if ??