Automatic Online Photo Gallery using the AJAX technique!

Photography being one of my passions, I have been looking into presenting photos in an online photo gallery. As some of you will know, a simple gallery would involve a lot of pages with all the pictures which is time consuming to create and update.
In steps AJAX (Asynchronous JavaScript and XML), a technique for creating interactive web applications. The intent is to make web pages feel more responsive by exchanging small amounts of data with the server behind the scenes, so that the entire web page does not have to be reloaded each time the user requests a change.
So, the user will have the row of the thumbnails at the bottom of the frame, and a large version at the top, when the user click the thumbnail it will use javascript to change the top image without having to reload the page.
But, the creater will still need to create the page with the specific thumbnails etc. Enters PHP, a server-side HTML embedded scripting language. Which a few choice lines of script you are able to list files in a directory on the webserver, specifically the folder which will be holding your photos. Once these have been obtained the page can then start creating itself with repeating code to fill in the thumbnails.

