Hi,
We are having trouble using a next previous link when we search a MySql Photograph dB.
The script below works fine, to display the next and Prev pages for ALL the photo's, but when we search for one type of photo that spans numerous pages, we have a problem. The hyperlink at the bottom of the first page shows only two more pages, but once you click on the link, it shows the links for ALL the pages in our dB.
If anyone has any ideas as to how we can correct this, please let us know.
<?php
print "<p>";
echo "<center><p>\n<br></b>";
// This displays the "Previous" link
if ($prev_page) {
echo "<a href=\"$PHP_SELF?page=$prev_page\">< Prev</a>";
}
// This loops the Pages and displays individual links corresponding
// to the photos.
for ($i = 1; $i <= $num_pages; $i++) {
if ($i != $page) {
echo " <a href=$PHP_SELF?page=$i>$i</a>";
} else {
echo " $i ";
}
}
// This displays the "Next" link.
if ($page != $num_pages) {
echo " |<a href=\"$PHP_SELF?page=$next_page\"> Next ></a>"
print ("</center><p>\n<br></b>");
}
include ("footer1.txt");
?>