hi..I'm new t0 php..
I am trying to get the value of the selected part of multiple listbox,
.The result should be send to all that i have selected but
it only returns the last one I choose. Is there any way to send to all values that I have select from the multiple listbox select type.Below is my code...Can somebody show me the example of coding...
<?php
$query2="select dep_code,unit_code,post_code from staff where staff_id = '$id'";
$result2=mysql_query($query2) or die(mysql_error);
$view2=mysql_fetch_array($result2);
$query4="select vip_code from userhistory where vip_code='$view2[post_code]'";
$result4=mysql_query($query4) or die (mysql_error);
$view4=mysql_fetch_array($result4);
$query="select * from userhistory where dep_code ='$view2[dep_code]' and post_code = '$view2[post_code]' and unit_code = '$view2[unit_code]' or vip_code='$view4[vip_code]'";
$result=mysql_query($query) or die(mysql_error);
$view=mysql_fetch_array($result);
do
{
$query3="select staff_name from staff where staff_id = '$view[staff_id]'";
$result3=mysql_query($query3) or die(mysql_error);
$display=mysql_fetch_array($result3);
//$bil++;
echo "<tr>
<td>$display[staff_name]</td>
<td>$view[memo_date]</td>
<td><a href=previewInbox.php?id=$view[history_id]>$view[memo_title]</a></td>
</tr>";
}
while($view=mysql_fetch_array($result));
?>