<?php $PageSecurity = 11;
include('includes/session.inc');
include('includes/function_lib.php');
include('includes/SQL_CommonFunctions.inc');
global $db;
$sid=$_REQUEST['sid'];
$storid=$_REQUEST['storid'];?>
<select  name="grn_no" id="grn_no" onchange="get_grndetail(this.value)">
<?php if($sid=='G'){?>
<option  value="0">Select GRN Number</option>
<?php 
$sql = "select id,grn_no from log_add_mrn where store='".$storid."'";
$result=DB_query($sql,$db);
while($myrow=DB_fetch_array($result)){
echo '<option Value="'.$myrow['id'].'">'.$myrow['grn_no'].'</option>';
}
}else if($sid=='S'){?>
<option  value="0">Select STN Number</option>
<?php 
$sql = "select id,stn_no from log_stn where to_store='".$storid."'";
$result=DB_query($sql,$db);
while($myrow=DB_fetch_array($result)){
echo '<option Value="'.$myrow['id'].'">'.$myrow['stn_no'].'</option>';
}
}
?>