开发者

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜