<?php 
$PageSecurity = 15;
include('includes/session.inc');
if($_REQUEST['q']!='')
{
$sql=DB_query("Select id,emp_code from empmaster where emp_site='".$_REQUEST['q']."'",$db);
?>
<select name="employeeCode" id="employeeCode" style="width:110px" onChange="getemployeeName(this.value)">
	<option value="0">Select</option>
	<?php 
	while($myrow=DB_fetch_array($sql))
	{?>
	<option value="<?php echo $myrow['id'];?>"><?php echo $myrow['emp_code'];?></option>
	<?php 
	}
	?>
	</select>
	<?php }
if($_REQUEST['code']!='')
{
	$sql=DB_query("Select emp_name from empmaster where id='".$_REQUEST['code']."'",$db);
	$myrow=DB_fetch_array($sql);
?>
<input type="text" name="employeeName" id="employeeName" value="<?php echo $myrow['emp_name'];?>" readonly="true" >
<?php 
}
?>