I have which has dynamic checkboxes named "holdtalent" which have the
value from a recordset "talent_id". I have a query to a recordset
getting the checkboxs state. If "Y" it is ticked, if "N" it is not
ticked.
This works fine and the data displays as does the checkbox state.
If I untick a checkbox, I want to update the database with "N". an
unticked checkbox doesnt send anything through $_POST so how do I get
the change in there?
I thought maybe.. I have recordset with the talent_id and the state
already there. If I refine that recordset to only give me the checked
values "Y" into a new array, then when the form is posted back with no
corresponding value but was "Y" in the recordset, then it must have
been unchecked, so update that row with "N" as the state.
But whats teh code to do eeet?
Also, if I have a recordset I'm paging through, with checkboxes, and I
check some on one page, then page through again and select some more,
how do I get those pre-selected values? Each time I page through it
doesnt remember the previous pages values.
I thought maybe dynamically setting the state of the checkbox with a
session variable. Then each time a "Next Page" link is clicked, it
submits the form recording the session state for that pages buttons.
But If I have a lot of data, I'll have a tonne of session variables.
And then how would I differentiate between when a form is submitted by
a button or a "Next Page" link?
I really dont want to use javascript to write the cookies each time a
checkbox is clicked as it might be incompatible with browser setups.
Another way would be perhaps parseing it into the querystring..
".php?cb1=y&cb4=n" etc but I have a string limit. There won't be THAT
many records, but I want the perfect solution.
Heeeeeeeeeeeelp :)