<?php
$PageSecurity = 11;
//echo $_SERVER['QUERY_STRING'];exit;
//print_r($_GET['itemcode']);
include('includes/session.inc');
include('includes/function_lib.php');
if(isset($_GET['q']))
{ 
	$query="Select  * from empmaster  where emp_site='".$_REQUEST['q']."' order by emp_name";	
	$sql_emp=DB_query($query,$db);
 	if(!$sql_emp){die('Error.'.DB_error());	}
 	?>
	<select name="employee_code" id="employee_code">
	<option value="">---Select---</option>
	<?php 	
	while($rowEmp=DB_fetch_array($sql_emp))
	{?>
	<option value="<?php echo $rowEmp['id'] ?>" <?php echo ($_REQUEST['empcode']==$rowEmp['id']?'selected':'') ?>><?php echo $rowEmp['emp_name'] ?></option>
	 <?php 
	}
	?></select>
 <?php } ?>