How do these .php galleries work?

I hope this is not a stupid question! I am very interested in making a gallery like this

http://www.josephkaynephoto.com/photo/snow-mounds-and-sage-brush-bw/ what interests me the most is how the photo-caption is displayed on the browser address line or how the url includes the photo-caption. And when the arrow is clicked for the next photo, the image goes to the next one and the link shows the photo-caption of that image.

How is this done? Is this done with php and a database? How can I create a link that includes the photo-caption and avoid the usual id and other numbers when using a php gallery?

Thank you for your help…

There are many different ways to create a gallery using PHP. Though I would argue whether that even needs to be done. The first question is really whether the site that is being built will need to have none-technical users create content. If not you could get away without using PHP. For example, if this is a personal portfolio site or something than really you could just get away with tossing the images in a directory and linking to them.

oddz… I have a working working gallery. But the links are not as nice as the one above… mine currently looks like this. http://www.rajeevthomas.com/viewgallery.php?cid=4&pid=376 I am just interested in making the link look like the one above where the image caption is part of the link rather than like the numbers and characters in mine…