How do I insure the value of a POST between pagination in CodeIgniter?

2

I have a form element with a select and a submit (filter). The data is filtered, the page is reloaded and the data is presented in a table. To see all the data, it goes through more than one page in the table (pagination). However, I use a value that comes from the value of the last POST (contents of select ) and when I change the page in the table, the table shows the data of the first element of select , since it does not saves the value of POST .

How can I save the post value so that the pages after the first one are also displayed?

    
asked by anonymous 20.03.2014 / 15:48

2 answers

4

Instead of POST , you can pass the value of this <select> via GET and put it on your paging.

Link example without the filter:

pagina.php?p=3

Filter link example:

pagina.php?p=3&filtro=teste

Post some code so we can help you better.

    
20.03.2014 / 15:59
1

A good way is to use session, type when filling the form and send stores the data of the post in sassion, and your filter starts to retrieve session information.

so you can transfer your post data from one page to another.

    
26.03.2014 / 14:21