Jump to content

Archived

This topic is now archived and is closed to further replies.

simon157

Display thumbnail images

Recommended Posts

Hi,
I'm a complete novice to php so could do with some help. I run an insect website which can display an insect image along with a small write. The image and text is displayed dynamically from a mysql database. Quite often I have more than one image of the same insect, so what I want to do is on the page, display a main large image and somewhere on the page a thumbnail image of the alternative image. Users can then click on the thumbnail to change the main large image and vice a versa.

Sorry about my poor description

Does anyone know of a script out there than canallow me to do this?

Thanks

Simon

Share this post


Link to post
Share on other sites
Although its not a php solution, this should accomplish what you want to do.

[a href=\"http://www.codetoad.com/dhtml_thumbnail.asp\" target=\"_blank\"]http://www.codetoad.com/dhtml_thumbnail.asp[/a]

Lite...

Share this post


Link to post
Share on other sites
[!--quoteo(post=365060:date=Apr 15 2006, 07:55 AM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ Apr 15 2006, 07:55 AM) [snapback]365060[/snapback][/div][div class=\'quotemain\'][!--quotec--]
Although its not a php solution, this should accomplish what you want to do.

[a href=\"http://www.codetoad.com/dhtml_thumbnail.asp\" target=\"_blank\"]http://www.codetoad.com/dhtml_thumbnail.asp[/a]

Lite...
[/quote]

Thanks for the reply. The code looks and works great. I would however like to add some code to it. This code displays three thumbnails. In mysql database I have three columns to hold the filenames of the images I want to use (image, addimage1 & addimage2). I've succesfully changed the code to pull the image source direct from the database. However, if I don't have an image filename in addimage1 or addimage2 then a empty image box is shown. Is there anyway to only display thumbnails where there is an entry in the database column.

I hope you can help me.

Thanks
Simon

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.