PHP Solutions

Chapter 12

The theme of this chapter is dynamic galleries, or, in English, using a database to populate a gallery.

Solution Index

Solution 12-1
Displaying the first image
Nothing is really functioning in this, but the thumbnail, the large image, and the caption are all taken from the database.
Solution 12-2
Activating the thumbnails
Clicking a thumnail will make the image change to its respective large size, as well as display the appropriate caption.
Solution 12-3
Looping horizontally and vertically
Making the table of thumnails show in two columns next to the large picture.
Solution 12-4
Displaying a subset of records
This displays only images 0-5 (1-6) from the database at any one time.
Solution 12-5
Creating the navigation links
Creating dynamic navigation links. It will display a maximum of 6 thumbnails at a time.