Hi,
I have looked at the FAQ on this, and a couple of forums before posting, but am still not sure how to do this. I wonder if anyone can help
I have a search page, which returns a search result and displays 8 of the returned images. The problem is, when the user clicks the NEXT button, it then defaults to show all of the images (140) instead of giving the next page in the search.
I am new to this and did not code it myself, but I need to change it so that the next button will show the next page of the search if a search has been carried out, but still show the next batch of images if the person is only browsing without having searched.
<td nowrap>Images <b><?php echo ($startRow_imgs) ?></b> to <b><?php echo ($startRow_imgs + $totalRows_imgs) ?></b>
returned out of <strong><?php echo $allRows_imgs ?></strong> total.</td>
</tr>
<tr>
<td> </td>
<td align="right"> <table border="0">
<tr>
<td align="center"> <?php if ($pageNum_imgs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_imgs=%d%s", $currentPage, 0, $queryString_imgs); ?>">First</a>
|
<?php } // Show if not first page ?> </td>
<td align="center"> <?php if ($pageNum_imgs > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_imgs=%d%s", $currentPage, max(0, $pageNum_imgs - 1), $queryString_imgs); ?>">Previous</a>
|
<?php } // Show if not first page ?> </td>
<td align="center"> <?php if ($pageNum_imgs < $totalPages_imgs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_imgs=%d%s", $currentPage, min($totalPages_imgs, $pageNum_imgs + 1), $queryString_imgs); ?>">Next</a>
|
<?php } // Show if not last page ?> </td>
<td align="center"> <?php if ($pageNum_imgs < $totalPages_imgs) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_imgs=%d%s", $currentPage, $totalPages_imgs, $queryString_imgs); ?>">Last</a>
<?php } // Show if not last page ?> </td>
Any suggestions would be very gratefully received.
Thank you