Results 1 to 4 of 4

Thread: checkbox pagination

  1. #1
    Join Date
    Aug 2008
    Posts
    23
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default checkbox pagination

    I have pagination in the page. The problem I have is, I will loose the status of the checkbox when I go to second page. If I select some of the checkboxes in page 1 and go to page 2 to select some more and if I come back, I loose all the selected checkboxes in page 1.
    Is there a way where I could save my check boxes in session and its checked while I browse across pages and gets submitted all at once? Could you please help me?

  2. #2
    Join Date
    Oct 2008
    Posts
    42
    Thanks
    0
    Thanked 9 Times in 9 Posts

    Default

    Yes, it is possible.

    You can store the values of your checkboxes in an array, serialize the array and store it in a session. Then, when you return to page 1 (for example), you unserialize the session variable and use the values in the array to repopulate your checkboxes.

    When you submit, you would again unserialize the array and process the values from the checkboxes.

  3. #3
    Join Date
    Aug 2008
    Posts
    23
    Thanks
    2
    Thanked 2 Times in 2 Posts

    Default

    how to serialize and unserialize the array?

  4. #4
    Join Date
    Oct 2008
    Posts
    42
    Thanks
    0
    Thanked 9 Times in 9 Posts

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •