I'm not too sure how to access multiple values from a html list box when a form is submitted using the post method. It seems to default to the last value selected in the list box. I thought perhaps the values might be contained in an array but I haven't been able to retrieve all the selected values.
here's the code I'm using for the list box:
<select name="locations" size="6" multiple>
<option value="none">-- SELECT LOCATION --</option>
<!-- BEGIN location -->
<option value="{LID}">{LOCATION_NAME}</option>
<!-- END location -->
</select></td>
and here's the code I'm using to retrieve it after the form is posted just to see how php receives the information (before I continue coding):
$postStuff = "";
foreach ($_POST as $key=>$val)
{
$postStuff = $postStuff."KEY: ".$key.", VALUE: ".$val."<br>";
}
$t->set_var("MESSAGE_TITLE", $postStuff);
I've tried treating the $val variable as an array, but that doesn't seem to work. I'm kind of stuck here because I'd really prefer to use the html list box with multiple selections. Any help is greatly appreciated!