I’m working on some search engine and I would like to have nice pagination, but it looks this is no go with POST type. I’ve some form in which is entered query for searching and after form is sended, there are some results. The first page of results is normally and work, but if I click on any other page in my pagination there is no results, because the POST input value is nowhere stored. I’ve already tried to do my search with GET like – to add query in URL, but this is also not possible because CodeIgniter dont’t allow some characters which are in urlencode. I was also looking for encoding the query string with base64, but it also looks this is no way because there are some unallowed characters again.
What I have to do instead all of these?
You can convert the POST data into GET data (e.g. as URL parameters, see Query part of the URI specification and Variables From External Sources in the PHP manual) or you store the search into the session and only pass along a search identifier so that you can retrieve the search’s POST data from session.