query($sql2); $foto = ""; while ($nt2 = $result2->fetch_assoc()) { $file = 'img/umgebung/bilder/'.$nt2['ID'].'.jpg'; if (file_exists($file)) { $foto = $nt2['ID']; echo ''; } } ?>
query($sql1); $nt1 = $result1->fetch_assoc(); $file = 'img/umgebung/bilder/'.$foto.'.jpg'; echo "

Bildergalerie

\n"; echo "

$nt1[Head]

\n"; echo ''; ?>