Hello,
I would like some knowledgeable help in how to accomplish the following.
I have a php page that displays a table with 13 rows in it currently.
These rows are populated dynamically from a mysql query that has a limit function.
I also add a checkbox for each row that is used for other functionality I will identify later.
There are HREF’s for First, Prev, Next and Last. When these HREFS a click then a
A post of the page is done and a new query is submitted and a new set of 13 values is returned.
This can happen for anywhere from 1 to 1000+ pages as the database is queried over and over.
My situation that I need to handle is this: If I check a couple or checkboxes on the first page, the
ID’s of the checked boxes need to kept and used later. I can then go to page 2 and check checkboxes
On that page. This can be repeated an undetermined number of times. To store the values I want,
I was appending values into a comma delimited string and If the value was already in the string then
I check so that it can not be added again. I also use the string to create an array so that when I
Go back to a previous page the checkbox will be checked if it was before I left to go to a new page.
Hope that isn’t to confusing. I needed to maintain the checkbox state for each checkbox even tho
They were in theory destroyed when the new query was executed.
This all is working pretty well.
My really problem now is: How can I go back and uncheck a check box on a page and have its value
removed from my comma delimited list. I would need some function in an onclick event. I don’t know
if that means javascript or if I can have a PHP function execute in the onclick event of the checkbox.
As I understand PHP and checkboxes, the checkbox doesn’t exist unless it is checked. Can anyone make
any clarification on that? So I can not loop thru my checkbox array, because only those that are checked
Show up in my array count, etc…
I you have a function either PHP or Javascript that I could use to parse the list and removed items that
Now should not be in the list (unchecked checkboxes). I would appreciate this.
Kim Hovorka
kimhovorka@yahoo.com