Hi All,

I have a created a custom meta box which is a dropdown set to allow multiple selects. This works well but I have no idea how to save the array.

Here is what generates the select box within the WordPress admin area:-

Code:
function os_linkto_meta_box_html() {
	global $post;
	echo '<select name="os_linkto_product[]" id="os_linkto_product" multiple="yes" size="10">';
	echo '<option value="">-</option>';
	$val = get_post_meta($post->ID, 'os_linkto_product', true);
	$q = get_posts('post_type=products&post_parent=0&numberposts=-1&orderby=menu_order&order=ASC');

	foreach ($q as $obj)
	{
		echo '<option value="'.$obj->ID.'" "checked="checked">'.$obj->post_title.'</option>';
	}
	echo '</select>';
}
I now need to save the selected option when the user clicks Update on the page.

I then need to show the full list and keep the selected items highlighted. As the user may want to select more or remove some selections.

What do I add inside here to save the array os_linkto_product[]

Thank you kind people.