Böyle dene
<?php
$link = '<a href="?sil=ok&resim=' . $yeniresimadi . '">Sil</a>';

echo '<img src="../resimler/' . $yeniresimadi . '" width="100px" height="100px" />';
echo $link;

if (@$_GET['sil']=='ok'):
unlink($_SERVER["DOCUMENT_ROOT"] . '/resimler/' . $_GET['resim']);
echo 'Resim silindi';
endif;
?>