I seem to be going in circles.
What I want to do is to have a user click on a link, and each time the link is clicked, a new photo is shown. I would name the photos sequentially, like "01.jpg, 02.jpg, 03.jpg", etc. The code I'm using to echo the images to the page is
<?php
if ($photo) {
$photo = $photo . ".jpg" ;
if (file_exists($photo)){
echo "<img src=\"" . $photo . "\" width=\"300\" height=\"400\">";
} else {
echo "<img src=\"default.jpg\" width=\"300\" height=\"400\">";
}
}
?>
Does that sort of make sense? How can I get it to loop through the other photos, forward and backward?