There's no need to use php, html is enough.
smth like
<IMG src='foo.jpg' style="display:none" id="super_img">
and
<BUTTON onclick="document.all.super_img.style.display = 'block'">
Maybe, here are some minor errors, but anyway.
Still, it won't work in Opera for sure and possibly will need some accuracy with other browsers.
Of course you can do it with php (like if $_GET['check']) echo '<IMG src="foo.jpg">';), but then you need to reload the page.