hey,
I have a list of checkboxes, for example
[ ] A
[ ] B
[ ] C
[ ] D
when the user presses the submit form button, I need to be able to tell which boxes have NOT been ticked. For example,
[x] A
[ ] B
[x] C
[ ] D
This returns A and C, but I need to know the boxes which have not been checked.
The list is made from the DB, so I have got a list of all the boxes in an array. I then compared the CHECKED values with that of the array. This then tells me which ones are checked... but I need to make another array of the boxes which are not checked.
I thought that it would simply be a for loop, something like
for ($x=0; $x<=sizeof($databasevalues); $x++)
{
//is this value from the form in the list?
//if yes, ignore it, but if not....?
}
so basically I need to say that if the value from the form is NOT in the array from the DB, then the user has NOT selected it.
Is there any way of doing this??
Hope I have made myself clear enough!! thanks!!