I have a form with about 50 different elements to it, which ends up querying a database for search results. Right now, I have it so that if more than X number of results is displayed, an error is outputted. What I really want, however, is for say 50 results to be displayed, then have a link at the bottom that says "Next 50" results.
I have a lot of experience with doing things such as this with my database system, so that's not the problem. The problem is I need to link to the same page I'm at (with all the variables), and pass off 2 more variables to keep track of which results to display.
The question is, is there any way to compile a link to link to the page you're at, passing all variables on, without having to manually do it? Otherwise, the link for "Next 50" results would have to be like:
$PHP_SELF?a1=$a1&a2=$a2....&a50=$a50&index=50
Any thoughts?