Next / Previous / All function using $_POST not $_GET,<

liunx

Guest
Hi there,

I have used in past the common method of making Next/Previous/ShowAll links for items in a database such as here:

<!-- m --><a class="postlink" href="http://www.inframatics.org/media.php">http://www.inframatics.org/media.php</a><!-- m -->

However this uses the $_GET method of determining how many pages to make:


if( $start > 0 ) {
print "\t\t<a href=http://www.htmlforums.com/archive/index.php/\"" . $_SERVER['PHP_SELF'] . "?start=" . ( $start - $records_per_page ) . "\">< Previous</a> | \n";
}
for ( $i=1;$i<=$pages;$i++ ) { // loop through
$newoffset=$records_per_page*($i-1) ;
print "\t\t<a href=http://www.htmlforums.com/archive/index.php/\"" . $_SERVER['PHP_SELF'] . "?start=" . $newoffset . "\">$i</a> | \n";
}

if( $count_results > ( $start + $records_per_page ) ) {
print "\t\t<a href=http://www.htmlforums.com/archive/index.php/\"" . $_SERVER['PHP_SELF'] . "?start=" . ( $start + $records_per_page ) . "\">Next ></a>\n";
}


Has anyone come up with a method of showing next/previous/show all buttons using the $_POST[''] method?

Thanks in advance.<!-- m --><a class="postlink" href="http://www.snippetlibrary.com/tutorials/tutorials.php?id=187Thanks">http://www.snippetlibrary.com/tutorials ... =187Thanks</a><!-- m --> again Scoutt :D
 
Back
Top