hi!
if you can select multiple options, it's either a "select box multiple" or several check boxes.
be sure the html has got distinct values set. in case of selectbox, make the input name an array.
<select name="product[]" multiple size=5>
<option value=1>first product</option>
<option value=2>second product</option>
<option value=3>third product</option>
</select>
now evaluate like this:
$products_selected = $_POST['product'];
if(is_array($products_selected))
{
for($i=0; $i<count($products_selected); $i++);
{
//... processing goes here
echo "product number ".$products_selected[$i]." has been selected ...<br>";
}
}
else
{
echo "you selected NOTHING.";
}
with checkboxes it's similar. you can name them
first product <input type=checkbox name=product[] value=1><br>
second product <input type=checkbox name=product[] value=2><br>
third product <input type=checkbox name=product[] value=3>
and process the same way.
by specifying "product[]" as the name, you make sure that php gets the selected ids in form of an array (enumerated from 0...n). however, if the user doesn't select anything, "nothing" (with no structure as well) is returned, and therefore you should check whether $product is an array before you loop through it.