I would recommend using a MySQL database to hold all the information for the photos, such as "Description" and the "URL" of the photo etc. Then I would suggest having a look at JavaScript for the actual loading/viewing page.
JavaScript is client side, which means its based and ran from the viewers (users) computer, meaning the page won't have to reload to change the main photo. If you use PHP, because its server side (on the hosts machine), it will mean reloading the page to change the main photo.
