Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/7463-display-thumbnail-images/
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
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.