<?php
$PageSecurity = 2;
include('includes/session.inc');
$title = _('View/Search Items') ;
include('includes/SQL_CommonFunctions.inc');
if($_REQUEST['partName']!='')
{
		echo $query="Select id,StockID,item_name from item_master where 
		SubCategoryID='".$_REQUEST['partName']."' and CategoryID='".$_REQUEST['main']."' order by StockID ASC";
   $data2="";
         $data2.="<option value=''>Select</option>";
	$item_sql=DB_query($query,$db);
	$c3=0;
	while($row3=DB_fetch_array($item_sql))
	{ 	
		$p='';
				if($row3['id'] == $_REQUEST['categoryid'])
				$p="selected";
	$data2.="<option value=".$row3['id']." ".$p.">".$row3['item_name']."</option>";
   }
	
}

echo $data2;
	
	?>

