Pagination Problem
Posted: Sun May 30, 2004 10:33 am
I am using Dreamweaver mx 2004, php and MYSQL:
When I insert recordet Navigation bar in dreamweaver the 'Next' and 'Previous' Text do not seem to work with my recordset.
The following PHP Code exists for the 'Previous' Text (for recordset 'Test2')
<?php if ($pageNum_Test2 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Test2=%d%s", $currentPage, max(0, $pageNum_Test2 - 1), $queryString_Test2); ?>">Previous</a>
<?php } // Show if not first page ?>
The following code exists for the 'Next' Text for the same recordset:
<?php if ($pageNum_Test2 < $totalPages_Test2) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Test2=%d%s", $currentPage, min($totalPages_Test2, $pageNum_Test2 + 1), $queryString_Test2); ?>">Next</a>
<?php } // Show if not last page ?>
This occurs on a master page that has been fed from a submit form (method Post). The odd thing is is that this code works for a recordset on another page that is fed from a URL Parameter!
Does anybody know what is wrong with the code?
When I insert recordet Navigation bar in dreamweaver the 'Next' and 'Previous' Text do not seem to work with my recordset.
The following PHP Code exists for the 'Previous' Text (for recordset 'Test2')
<?php if ($pageNum_Test2 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Test2=%d%s", $currentPage, max(0, $pageNum_Test2 - 1), $queryString_Test2); ?>">Previous</a>
<?php } // Show if not first page ?>
The following code exists for the 'Next' Text for the same recordset:
<?php if ($pageNum_Test2 < $totalPages_Test2) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Test2=%d%s", $currentPage, min($totalPages_Test2, $pageNum_Test2 + 1), $queryString_Test2); ?>">Next</a>
<?php } // Show if not last page ?>
This occurs on a master page that has been fed from a submit form (method Post). The odd thing is is that this code works for a recordset on another page that is fed from a URL Parameter!
Does anybody know what is wrong with the code?