There are several ways to do this:
- Store the previous queries in a hidden field, then
you can run all of them, plus the new one every time
you want to generate the table. Actually I don't
know how you build queries but for security reasons
I would not store the
actual query but the parameters you used to generate
it, or anything that allows to rebuild the query safely.
Of course that means that you have to run several
queries to build the 2cd page, so performance might
be an issue.
- Store the results of the first request in a file
(make sure you generate a unique filename as described
in "unique" filename?) and pass the filename in a hidden field.
Of course this is slightly insecure as a user can
change the filename.
I don't know Apache::Session but I suspect you might be
able to use it too.