Not sure if this is the same problem I had, but thought it might help. When posting a select list with multiple items selected, it is treated like an array in PHP. So your code would change to:
-------------Snippet 1---------------------
<SELECT name="JobCapacity[]" multiple>
<OPTION value="SDE">Software Development Engineer
<OPTION value="NA">Network Administrator
<OPTION value="SA">System Administrator
<OPTION value="TWD">Technical Writer Documentation
<OPTION value="O">Operations
</select>
-------------Snippet 2---------------------
And after the form is posted you can print the selected items like this:
<?
for ($i=0; $i < sizeof($JobCapacity); $i++) {
print ('Next capacity:'.$JobCapacity[$i].'<br>');
}
?>
Hope that helps.
Matt Murray wrote:
I'm running PHP3 under Linux.
In my HTML form (jobapply.php), I have a multiple select list to choose from. When the information is sent to the contact person, only the first selected option gets sent (see 2nd snippet) when I have selected 3, 4, or 5 items.
-------------Snippet 1---------------------
<SELECT name="JobCapacity" multiple>
<OPTION value="SDE">Software Development Engineer
<OPTION value="NA">Network Administrator
<OPTION value="SA">System Administrator
<OPTION value="TWD">Technical Writer Documentation
<OPTION value="O">Operations
</select>
-------------Snippet 2---------------------
In what capacity would you like to work: SA, , , , ,
NOTE: Then I get all of these other commas put into the e-mail.
Could someone tell me why this is doing this? I have tried changing it to just checkboxes and the same thing happens.
Any help you can provide will be appreciated.