When creating your select box, set your form field to be established as an array:
<SELECT NAME="selectvar[]" MULTIPLE>
<? // code to generate options ?>
</SELECT>
Then when your script receives data from this form, it will have an array $selectvar[] the elements of which contain all selected items from your menu.