What have you tried?
What specific errors are you getting?
Can you provide more information, or have you not done anything yet and are
looking for the concept of how to accomplish an online image gallery? If so....
You could google for php+mysql+gallery+script
The basic idea is that you retrieve first the total numbers / count of the images for a
particular category of images to determine total number of files/pages.
Then you retrieve one image and link to the next image if you are at image number one,
but not yet at the last image in your record set.
If you are at image number two or above, you link to the previous image.
your links would look something like:
<?php
echo '<a href="?previous='.($imageID - 1).'">previous</a>';
echo ' <div><img src="'.$row['src'].'" alt="'.$row['alt'].'" border="0" /></div> ';
echo '<a href="?next='.($imageID + 1).'">next</a> ';
?>
That is the BASIC concept anyway. Of course instead of text links, you can create buttons using images, or literl form buttons. Whatever you wish.