I am using this code to return an array of values to a PHP script:
$f is just a counter BTW.
<tr>
<td bgcolor=\"#CCFFCC\">
<input type="checkbox"
name="field<?=$f;?>[]"
value=" a value">
</td>
<td bgcolor=\"#CCFFCC\">
<input type="checkbox"
name="field<?=$f;?>[]"
value=" a n other value">
</td>
<td bgcolor=\"#CCFFCC\">
<input type="checkbox"
name="field<?=$f;?>[]"
value="DESC">
</td>
<td bgcolor=\"#CCFFCC\">
<input type="checkbox"
name="field<?=$f;?>[]"
value=" a value">
</td>
<td bgcolor=\"#CCFFCC\">
<input type="checkbox"
name="field<?=$f;?>[]"
value="DESC">
</td>
</tr>
My problem is that if a checkbox is not checked, then it does not register as a NULL value in an array element. E.g. Suppose you checked the first and last checkbox. This would return an array of just two elements and not the five I would have expected. Is there a way to insist on the array returning 5 values even if not all boxes are checked (NULL values)?
Cheers!
M.