I am having problems with pagination. Actually, the documentation doesn't tell much on how to implement it. I have a search page that will display the search results. I want it broken down into pages, as they can compile a lot if there are a lot of data.
Following the tutorial, here is my controller (I will just paste it on pastebin for convenience):
I also routed it on router.php since it add /:number in the uri if you click two, as intended, so I add it up.
Of course, when I click it, I am just directed to a blank search page. I would think it is because the search parameters were not passed when I clicked two, as the $_POST is empty.
So what can I do to make this work? Should I change my form method to GET instead of POST? Any other things I had missed in the Model?
I store them in session flash storage in the search method, after validation of the input. And if no post is present, and check if I can retrieve them from flash. If so, I use that to proceed, if not I redirect away with an error message ('no search criteria entered').