There actually isn't a need for a database here
name the images sequentially and put them in a folder on your webserver
have a single php page that takes an argument in its url "&page=4" for instance
get the page number from the URL using $_GET
check if the image (4.png) or whatever exists
check if the next image (5.png) exists
echo out a page including the url to that image, and a link around the image pointing at the next one if it exists
let me know if you need more help writing it