Hi Guys,
Any ideas on how to solve this problem?
I have a web page displaying database values in a table, using pagination, I display the result over several pages. Which works fine.
I have a "display on web " checkbox in each row which allows the user to check or uncheck. The user presses an update button at the bottom of the page which updates the database value.
My problem is, if the user ticks a few boxes on different pages, THEN presses the update button, it only updates the values on the current page. I think this happens because each time the user changes page, the checkbox array is re-initialised.
Any ideas of how to get around this? Is there away of finding out that a checkbox value has been changed and putting into some sort of global array?
Thank you for your time
Checkboxes Over Multiple Pages
Moderator: General Moderators
-
montecristo
- Forum Newbie
- Posts: 20
- Joined: Thu Oct 19, 2006 9:51 am
-
timclaason
- Forum Commoner
- Posts: 77
- Joined: Tue Dec 16, 2003 9:06 am
- Location: WI
Pagination
You could do some kind of Javascript onclick for the checkboxes that sends a parameter to a PHP page, which then puts update values into a buffer table in your database. Then on the update, run a query on that buffer table, update appropriate records, then flush the buffer table.
Or you could uses SESSION[] stuff or cookies, as well.
Or you could uses SESSION[] stuff or cookies, as well.