<?php 
$PageSecurity = 4;
include('includes/session.inc');
include('includes/DefineSuppTransClass.php');

    $store_sql = "SELECT * FROM stockcategory where stockmaincategory = '".$_GET['site']."'";
	
	$data2="";
	$data1='';
		$data1.="<select name='categoryid'  style='width:100%' id='categoryid' onchange='showdata(this.value)'>";
			$data1.="<option value=''>Select</option>";
 			$store_result = DB_query($store_sql,$db);
			while($store_row = DB_fetch_array($store_result))
			{
				
				$p='';
				if($store_row['id'] == $_REQUEST['categoryid'])
				$p="selected";
			
			
		$data1.="<option value=".$store_row['id']." ".$p.">".$store_row['categorydescription']."</option>";
			 }
			
			$data1.="</select>";
	
	
	      $data2.="";
         $data2.="<option value=''>Select</option>";
    $query="Select id,StockID,item_name from item_master where CategoryID='".$_REQUEST['site']."'";
	$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>";
	
	
	$c3++;
	}
	

	      
	
	
	
	
	echo $data=$data1."__".$data2;


?>
