hi,
while submitting the form this select will contain an array
check the size of the array and use the for loop to find the elements in the array
or
form.php
<form method=post name=frmlist onSubmit="return validate()" action='formsubmit.php'>
<input type=hidden name=sitems>
<select multiple name='sublist'>
your options
</select>
<input type=submit value=submit>
</form>
<script language=javascript>
function validate()
{
temp="";
with(document.frmlist.sublist)
{
for(var loopIndex=0;loopIndex<length;loopIndex++)
{
if(options[loopIndex].selected)
{ temp=temp+" "+options[loopIndex].value; }
}
}
document.frmlist.sitems.value=temp;
}
</script>
formsubmit.php
<?php
$sitems=$_POST["sitems"];
if(strlen($sitems)>0)
{
$sitemsarr=explode(" ",$sitems);
for($i=0;$i<count($stiemsarr);$i++)
{
echo $stiemsarr[$i]."<br>";
}
}
?>