to select multiple groups, you would need to set the Select list as a multiple select list, and edit the name to include "[]" at the end:
<select name="selectName[]" multiple id="select">
The way a multiple select list works in PHP is that the selections are added to an array. The array needs to be converted to a comma separated list. Add the following code at line 1 to convert the array:
<?php
if($_SERVER["REQUEST_METHOD"] == "POST") {
foreach($_POST as $key => $val) {
if(is_array($_POST[$key])) $_POST[$key] = implode(", ", $_POST[$key]);
}
}
?>
when creating the recordset, you will need to use advanced mode. in the recordset, you can use the IN keyword in the WHERE Clause, for example a simple recordset to select where multiple IDS exist, would look like:
SELECT * FROM tableName WHERE groupID IN (1, 4, 5)
to use the select list value instead of hard coding the group IDs:
SELECT * FROM tableName WHERE groupID IN (".((isset($_POST['selectName']) && $_POST['selectName'] !="")?$_POST['selectName']:"199").")