Welcome Guest, Not a member yet? Register   Sign In
Really confusing and cumbersome
#1

[eluser]phpfresher[/eluser]
I have a form with type post , and i need to search the data according to form parameter. And i have a pagination in search result.
The problem i am facing is the post values i.e. the parameter to search obtained from form will disappear when i click in the next button.
Is there any possibilites to preserve the post parmeters on page reload during paginaation.

Thanks in advance.
Will be grateful..really troubling me
#2

[eluser]PhilTem[/eluser]
Save the search parameter in your session/cookies and read it from there. Otherwise you would have to make the next-links a button which re-processes the form.
#3

[eluser]phpfresher[/eluser]
Will it be the best solution to save the the Post parameters in session or cookies. I have tried this solution too but i am confused about using this method.
Thanks
#4

[eluser]PhilTem[/eluser]
I think it's best practice. Or at least most commonly used.

Or you'll add the search query as a get-parameter to your pagination links and your search-logic will first look for a post parameter, if none is found look for get parameter, if none is found display the pure search form.
#5

[eluser]porquero[/eluser]
Is better user search forms with GET method, so you can:

* reuse seted form data
* share search results
* SEO friendly

I recommend to you use get form method.
#6

[eluser]skunkbad[/eluser]
You should check out Community Auth. It has a paginated search example in it which uses ajax to reload the content. Without javascript it does not have the search functionality, only pagination of all results, so maybe this isn't copacetic for you, but that's how I like to do paginated searches.




Theme © iAndrew 2016 - Forum software by © MyBB