Checkboxes represent one method of allowing multiple values to be selected. List boxes are another example. A group of checkboxes, however, are defined by isolated HTML tags whereas a list box is a single HTML tag in which multiple entries are contained. In order for the mini API to handle these form fields correctly the checkboxes must all have the same name, with minor quirks depending on the language in which the server-side script to which the form posts is written. PHP, for example, requires that the names of related checkboxes end with square brackets:
<input type=”checkbox” name=”toppings[]” value=”pepperoni” />
<input type=”checkbox” name=”toppings[]” value=”sausage” />
<input type=”checkbox” name=”toppings[]” value=”anchovies” />