Create a recordset to pull all of the records from the people table.
We will need to have at least the peopleID and email address.
Add two multi select lists to your page, the first one will be set to be dynamic and use the people recordset. Set the label to the email address and the value to the peopleID column.
name the second select list "people[]"
You will then add a button to the form, not be submit buttons, just standard button:
<input name="button" type="button" id="button">
Select it in design view, and on the Behaviors panel, use the Dynamic Dropdowns Add Value From Source List to Target List behavior.
Also add a submit button to the page.
This will have a select list that gives you the ability to chose the people you want and add them tho the people select list. Since the name of the people select list is "people[]" it will create an array of all of the selections.
assuming you are storing the mailingListID value in a hidden form element named mailingListID, you would need to hand code the insert record behavior to loop through the array, something like:
<?php
if(isset($_POST["people"]) && is_array($_POST["people"])) {
$count = count($_POST["people"]);
for($i = 0; $i < $count; $i++) {
$sql = "INSERT INTO listMember (MailingListID, peopleID) VALUES(".$_POST["mailingListID"].", ".$_POST["people"][$i].")";
mysql_select_db($database_localhost, $localhost);
$Result1 = mysql_query($sql, $localhost) or die(mysql_error());
}
}
?>