few things:
1) for a multiple select list, you need to include [] at the end of the name to create an array of the selections. change:
<select name="Target" size="10" multiple class="optionsbox" id="Target">
</select>
to:
<select name="Target[]" size="10" multiple class="optionsbox" id="Target">
</select>
2) Just because the items are added to the target list does not mean they will be inclded when the form is submitted, they need to be selected. to automaticly select all items in the target list when the form is submited, add the following javascript code to the head of ypou page:
<script type="text/javascript">
<!--
function selectAllOptions(selStr)
{
var selObj = document.getElementById(selStr);
for (var i=0; i<selObj.options.length; i++) {
selObj.options[i].selected = true;
}
}
//-->
</script>
and change the submit button:
<input id="submit" name="submit" type="submit"/>
to:
<input id="submit" name="submit" type="submit" onclick="selectAllOptions('Target');" />
3) the multiple select list will send an array, it needs to converted to a comma separated list. add the following code at line 1 to accomplish this:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}
}
?>