<?php class ItemMaster
	{
	   
		public function ItemMaster()  
		{
		 
		}
		   function  GetItem($id)
		   { 
		    
					global $db;
					$sql_state=DB_query("SELECT id,item_name ,StockID FROM  item_master ",$db);		
					if(!$sql_state)
					{
					   die('Error.'.DB_error_msg($db));
					}
					echo "<select name='ItemList' >";
					echo "<option value='000'>---</option>";
					while($row=DB_fetch_array($sql_state))
					{
					   $p='';
					   if($row['id']==$id)
					   $p='selected';
					  echo "<option value='".$row['id']."' $p >".$row['item_name']."( ".$row['StockID']." ) </option>";
					}
					echo "</select>";
			}
	
	}
	
	$ClassItem=new ItemMaster();
	?>
