Hi, I have hit a problem. I have a dynamically generated results page (from a search) where a user can select a number of options via checkboxes, which then pass on to the next page where they can email (based what they select on the checkboxes)...My problem is as follows, I have 25 results per page (It can go over 1000 in all for some searches) and each time I click "Next" to paginate the previous pages checkbox results are cleared. How do I maintain the checkbox values (and their checked status) from page to page during pagination so that all selections over all the pages can be passed onto the email form?
Thanks (Im a newbie don't hurt me)
Checkboxes & Pagination
Moderator: General Moderators
Pass the checkbox values from page to page via sessions.
Code: Select all
<input type="checkbox" name="checkbox" value="checkbox"<?php echo $_SESSION['checkbox']?' checked':''>- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Hmm, that code snippet doesn't feel right.
No need to repopulate the checkboxes. 
Code: Select all
Page 1 -> Page 2 -> Page 3 -- Submit -
| | | |
\_/ \_/ \_/ \_/
Session Database -------------- > Email