I sat and looked through a bunch of posts here on phpbuilder.com and found the solution, actually I found a couple, this was the simplest one.
The PHP script part
if ($selectbox) { ## checks if anything is selected
for ($i=0; $i < sizeof($selectbox); $i++) { ## doing a loop for each item selected, number of items is returned by the sizeof($selectbox)
echo "selectbox: " . $selectbox[$i] . "<br>";
}
exit;
}
The form elements, please notice the <select> name value, put [] after the name, makes it an array
<form action="<? echo "$php_self"; ?>" method="post" name="thisform">
<select name="selectbox[]" multiple size="5">
<option value="1">option1</option>
<option value="2">option2</option>
<option value="3">option3</option>
<option value="4">option4</option>
<option value="5">option5</option>
</select>
<br>
<a href="javascript:document.thisform.submit();">Submit</a>
</form>