PHP gallery problem
Posted: Thu Nov 05, 2009 6:25 pm
So im trying to create a PHP gallery. And I want the thumbnail (links) to display the actual image beside it. Now so far I have that part working. But the issue is when I go that page in the first place. I want the first image to already be displayed and then I can continue clicking the others. But it simply doesn't work. I've tried a number of different variations and I get a number of different problems...
Heres my code:
<ul>
<li> <a href="?pic=Album" ><img src="Images/Album.jpg" alt="Album Cover" title="Album Cover" height="75px" width="75px" /></a></li>
<li> <a href="?pic=AlbumCD"><img src="Images/AlbumCD.jpg" alt="AlbumCD" title="AlbumCD" height="75px" width="75px" /></a></li>
<li> <a href="?pic=Logos"><img src="Images/Logos.jpg" alt="Logo Designs" title="Logo Designs" height="75px" width="75px" /></a></li>
<li> <a href="?pic=SnowboardDeck"><img src="Images/SnowboardDeck.jpg" alt="Snowboard Deck" title="Snowboard Deck" height="75px" width="75px" /></a></li>
</ul>
<?php
$pic = $HTTP_GET_VARS['pic'];
if(!$pic) {$pic='Album';}?>
<p id="imgs"><img src="Images/<?php echo $pic; ?>.jpg" alt="example" title="example" height="450px" width="450px"/></p>
Its been really frustrating me and I would appreciate any help!
Heres my code:
<ul>
<li> <a href="?pic=Album" ><img src="Images/Album.jpg" alt="Album Cover" title="Album Cover" height="75px" width="75px" /></a></li>
<li> <a href="?pic=AlbumCD"><img src="Images/AlbumCD.jpg" alt="AlbumCD" title="AlbumCD" height="75px" width="75px" /></a></li>
<li> <a href="?pic=Logos"><img src="Images/Logos.jpg" alt="Logo Designs" title="Logo Designs" height="75px" width="75px" /></a></li>
<li> <a href="?pic=SnowboardDeck"><img src="Images/SnowboardDeck.jpg" alt="Snowboard Deck" title="Snowboard Deck" height="75px" width="75px" /></a></li>
</ul>
<?php
$pic = $HTTP_GET_VARS['pic'];
if(!$pic) {$pic='Album';}?>
<p id="imgs"><img src="Images/<?php echo $pic; ?>.jpg" alt="example" title="example" height="450px" width="450px"/></p>
Its been really frustrating me and I would appreciate any help!