Ok
Managed to sort it using a multiple selection box.
See below
Input form section
Code: Select all
<?
echo"<select name=\"Project_Members_Select[]\" multiple=\"multiple\">" ;
while($row=mysql_fetch_assoc($my_query3))
{
echo "<option value=\"".$row['Name']."\">".$row['Name']."</option>";
}
?>
Form submit section
Code: Select all
$Project_Members=$_POST["Project_Members_Select"];
for ( $ii = 0 ; $ii < count($Project_Members) ; $ii++ )
{
$choose_branch = $choose_branch . " " . $Project_Members[$ii] ;
}
//$result = "You selected : " . $choose_branch ;
$Project_Members = $choose_branch;
$sql="insert into $branch(VSI_NUMBER,Salesman,ENGINEER,CUSTOMER,SALESGROUP,
SICCODE,N_E,YEARQTY,CHCKLRATIO,VALUEExworks,DATEIN,COMMENTS,ACTIONDATE,
Project_Members,Gate,Job_No,Cata_Number)
values('$VSI_NUMBER','$Salesman','$ENGINEER','$CUSTOMER','$SALESGROUP','$SICCODE'
,'$N_E','$YEARQTY','$CHCKLRATIO','$VALUEExworks','$DATEIN','$COMMENTS','$ACTIONDATE',
'$Project_Members','$Gate','$Job_No','$Cata_Number')";
Hope this helps someone else!
Geoff