how to maintain checkbox status in pagination in php
i ve used pagination. what the problem is fo开发者_开发问答r example: i ve 3 pages 1) in the first i'm clicking some checkboxes and 2) i move on to the second and 3) return back to the 1st page the checkbox that i already checked is unchecked. for form submission i need the checkbox status that i ve checked on all pages should be submit. i need a detail description and clear answer for my question. Is anybody there to help me pls.....
if you have your form on the same pages with result, it's simple:
GET method must be used.
So, on the 1st page you will have all values in the $_GET array.
So, you can pupulate your checkboxes according to $_GET array values.
For the other pages you have to preserve the query string.
It can be done using http_build_query()
function
精彩评论