ok I've been looking all over the net and I cannot find anything about this issue anywhere, other than the same problem is mentioned once in a great while, but never shown how to rectify this.
I'm at a point where I can't do anything else and I could use some insight as to how to fix this problem.
php will not store false values in a checkbox array.
say, for instance, you have a table:
<table>
<tr>
<td><input type="checkbox" name="box[]" value="box1"/></td>
<td><input type="checkbox" name="box[]" value="box2"/></td>
<td><input type="checkbox" name="box[]" value="box3"/></td>
<td><input type="checkbox" name="box[]" value="box4"/></td>
<td><input type="checkbox" name="box[]" value="box5"/></td>
</tr>
</table>
The problem that I am consistently running into is that say boxes 2 and 4 are checked. Since php flat out refuses to store false values in an array, that means:
box[0]=box1, box[1]=box2
this throws off the true array, because it should be:
box[0]=false, box[1]=box2, box[2]=false, box[3]=box4, box[4]=false
or something to that effect.
this is particularly frustrating because I'm using an associative array that lines the user's ID number with several arrays within this array. If the values cannot store false, then different users end up with different qualities being checked where they shouldn't be, because of the fact that php will not store false values in a checkbox array, or radio button array, for that matter.
so how does one get around this problem?
I've tried isset but it doesn't really work, either, because php just ignores the false values, so an array that should contain 5 elements only contains (for this example) 2 elements, both of which will come back as true since they hold a value, tho the value is in the wrong place.
I'm getting kind of desperate here, and I don't know any other way around this, other than something that's really, really impractical. Any help would be greatly appreciated.
thanx