include "../inc/album.inc.php"; ?> include '../inc/header.php'; // Display the photo $id = $_GET['photoID']; $photoQueryResult = retrieve_yearbook_photo($id); list($photoID, $photo_url, $title, $category) = mysql_fetch_array($photoQueryResult); echo "
"; $result = mysql_query("Select photoID from gns_yearbook where photoID < $id and category = '$category' order by photoID DESC limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo "Prev | "; } } echo "Index"; $result = mysql_query("Select photoID from gns_yearbook where photoID > $id and category = '$category' order by photoID limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo " | Next"; } } echo "
"; echo "$title
$description
"; $result = mysql_query("Select photoID from gns_yearbook where photoID < $id and category = '$category' order by photoID DESC limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo "Prev | "; } } echo "Index"; $result = mysql_query("Select photoID from gns_yearbook where photoID > $id and category = '$category' order by photoID limit 1"); if($row = mysql_fetch_assoc($result)) { if($row['photoID'] != $id) { echo " | Next"; } } echo "