Jump to content


Photo

Display thumbnail images


  • Please log in to reply
2 replies to this topic

#1 simon157

simon157
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 15 April 2006 - 07:33 AM

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

#2 litebearer

litebearer
  • Members
  • PipPipPip
  • Advanced Member
  • 2,357 posts
  • Locationwhite lake michigan

Posted 15 April 2006 - 12:55 PM

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...

all the brothers were valiant!

[br][br]The truely intelligent people are not those who create the dots; rather they are they ones with the ability to connect the dots into a coherent picture

#3 simon157

simon157
  • Members
  • Pip
  • Newbie
  • 8 posts

Posted 16 April 2006 - 08:34 AM

[!--quoteo(post=365060:date=Apr 15 2006, 07:55 AM:name=litebearer)--][div class=\'quotetop\']QUOTE(litebearer @ Apr 15 2006, 07:55 AM) View Post[/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




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users