Use an array-style name ("[]" on the end) for the HTML select element:
<select name='sample[]' multiple='multiple'>
In your script, you will then have a sub-array in the $POST array (or $GET if applicable) with the values selected ($POST['sample'][0], $POST['sample][1], etc...).
echo "<p>You selected:</p>\n";
echo "<ul>\n";
foreach($_POST['sample'] as $selection)
{
echo "<li>$selection</li>\n";
}
echo "</ul>\n";