Saving Checkbox Group to MySQL db using array
I have a dynamic checkbox group where I want to allow multiple selections of the checkboxes to be made and written to the database. The code is pasted below.
The problem it's having is that it is only writing a one (the last checked) of the choices to the database - even when there are multiples checked.
I assume this can be accomplished just not sure how.
<?php do { ?>
<input type="checkbox" name="gallerycategories" value="<?php echo $row_artcategories['Category']; ?>" id="CheckboxGroup1_0">
<?php echo $row_artcategories['Category']; ?>
<br>
<?php } while ($row_artcategories = mysql_fetch_assoc($artcategories)); ?>