Welcome Guest, Not a member yet? Register   Sign In
What's the best practice for passing variables through pagination?
#1

[eluser]louisl[/eluser]
I have a search where the user chooses some options then the results list are paginated using CodeIgniter pagination.

What's the best way to remember those user choices when paging through the results?

1. I was thinking the most sensible option would be something like http://www.site.com/search/p/20/[encrypted string of vars]
I guess I'd have to urlencode it but what encryption to use to minimise the string length and is this the best way?

2. I guess another method could be to set and retrive session or cookie data.

3. Or to set the pagination links to POST with javascript though I don't like the sound of this option in case a user has javascript disabled.

I think option 1 is preferable but I'm open to suggestions.





Theme © iAndrew 2016 - Forum software by © MyBB