<?php
$PageSecurity = 2;
include('includes/session.inc');
include('includes/function_lib.php');
$data1=''; $data2='';
$sql=DB_query("Select id,item_name from item_master where SubCategoryID=".$_REQUEST['id']." and CompanyId=".$_SESSION['ACGCompanyId']." and type_of_material='QualityCheck'",$db);

$data1.='<option value="">Select Part Name</option>';
while($row=DB_fetch_array($sql)){
	extract($row);
	$data1.='<option value="'.$id.'">'.$item_name.'</option>';
}

$sql2=DB_query("Select id,StockID from item_master where SubCategoryID=".$_REQUEST['id']." and CompanyId=".$_SESSION['ACGCompanyId']." and type_of_material='QualityCheck'",$db);

$data2.='<option value="">Select Part No.</option>';
while($row2=DB_fetch_array($sql2)){
	extract($row2);
	$data2.='<option value="'.$id.'">'.$StockID.'</option>';
}
echo $data1."__".$data2;
?>