i am making an image gallery. I am having the thumbnails and full image on the same page. It all works well but when i open this gallery page the full image is not there. The full image appears only when i click on a thumbnail.
How can i let the full image appears immediately after opening that page. Can somebody help me or show me a tutorial about this. I really have no idea how to solve this problem and i can't find anything about this on the internet.
The code is;
<div id="sidebarleft"> <?php //thumbnails foreach ($images as $image){ if (file_exists("./thumbs/{$image}")){ echo "<a href='?full_img={$image}'><img src='thumbs/{$image}' alt='{$image}' /></a>"; }else{ echo "<a href='?full_img={$image}'><img src='?img={$image}' alt='{$image}' /></a>"; } } ?> </div> <div id="image"> <?php //Full image if (isset($_GET['full_img'])){ echo '<a href="?full_img={$image}"><img src="', htmlentities($_GET['full_img']), '" alt="{$image}" /></a>'; } ?> </div>
Thanks,
Robbedoesie