Hi,
I am beginner in PHP and need to want to create a gallery of thumbnailed images so that user could load the original image (in separate window) after clicking on its thumbnail.
Is it possible to do it in PHP?
I'll be very grateful if you give me some tips on how to write this script.

Recommended Answers

All 4 Replies

If you have the thumbnail and image, it's just simple HTML.

<a href="image.jpg"><img src="thumbnail.jpg" alt="Image description"></a>

If you need to automagically generate the thumbnail, you might be looking at a third party thing (and are past my expertise.)

If you have the thumbnail and image, it's just simple HTML.

<a href="image.jpg"><img src="thumbnail.jpg" alt="Image description"></a>

If you need to automagically generate the thumbnail, you might be looking at a third party thing (and are past my expertise.)

Thanks Puckdropper,
I want to generate thumbnails from image files, so that clicking on thumbnail will load file in its full size. I don't have thumbnail image of the file. Does PHP have tools to manage image size ?

PHP has a standard (free) library designed for image manipulation - GDImage.
There are a number of tutorial scripts available for creating thumbnails from uploaded images. Have a trip through google and if you don't find anything suitable come back and I'll see what i can knock up for you.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.