The below code displays an image on a page> want to somehow set it up so that when the use clicks the image it advances to the next photo in the query. any ideas how to do this thank you
PHP Code:

$photoId = $_GET['photoID'];

//get image
$query_get_photo = ("select * from image_files WHERE image_id = '$photoId'");
$get_photo = mysql_query($query_get_photo )or die("SQL Error: $query_get_photo <br>" . mysql_error());

     $photo = mysql_fetch_assoc($get_photo);
     $foundPhoto = $photo['image_name'];
     $imageOwner = $photo['user_id'];
// Get album Author
    $query_get_author = ("select * from users WHERE user_id = '$imageOwner'");
    $get_author = mysql_query($query_get_author )or die("SQL Error: $query_get_author <br>" . mysql_error());

     $author = mysql_fetch_assoc($get_author);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
<body>
<div id="outer"> 
            <div id="hdr">
                  <!--Header-->             
                 <?php include('../design/topbanner.php'); ?>
</div>
            
        <div id="bar">
        <!--Subheader-->
        <h3 style="margin-left:250px; color:#848484; padding-top:10px;"><?php echo $_SESSION['fname'].' '$_SESSION['lname']; ?></h3>
            </div>
        
        <div id="bodyblock">
          <!--body Lock-->
          
            <div id="l-col">
                        
            <?php include('../searchMembers.php'); ?>
                    </div>
            
          <div id="cont">
         <!--<p style="font-size:10px; padding:5px;"><a href="photos.php">Back to Albums</a></p>-->
          <div class="imageFull">
   <p style="font-size:10px; color:#848484; font-style:italic;">Create Date: <?php echo $photo['create_date']; ?> </p>
    <p style="text-align:center"><img src="../user_images/<?php echo $foundPhoto?>" /></p>
             
        <p style="text-align:right; padding-right:20px; margin-top:5px; font-size:10px;">From the Album:<br />
        <?php echo $photo['album']; ?> <span style="color:#000000">by</span> <?php echo $author['first_name'].' '.$author['last_name']; ?></p>    
        <p><?php echo $photo['details']; ?></p>