I'm attempting to save multiple options selected from a multi-select menu as Wordpress meta box. The possible options are simple (integers 1 through 6), but I'm not sure how to increase the counter ($i++) and save all results that are selected by the user. When a user updates the edit page, the select menu only displays the last selected option and not both or all options selected.
<select name="show_sched[<?php echo $c; ?>][frequency]" multiple="multiple" size="4">
<option value=""></option>
<?php for($i=1; $i<=6; $i++): ?>
<option value="<?php echo $i; ?>"<?php if($track['frequency'] == $i) { echo ' selected="selected"'; } ?>><?php echo $i; ?></option>
<?php endfor; ?>
</select>