I need to check the # number of checkboxes that have actually been checked on a page (so to insert the value into a table).
checkboxes appear as:
<input type="checkbox" name="commercial[]"
<?php $checkbox= 'commercial[]';
$howmany=count($checkbox);
for ($x=0;$x<$howmany;$x++)
{
echo $howmany[$x]; }; ?>
Something's not quite right here - but how can this be made to count the checked checkboxes on an Update form ( that is, how can code "count" either while selections are made or by the "Submit")?