<?php 
ob_start();
$PageSecurity = 4;
include('includes/session.inc');
include('includes/function_lib.php');
if($_REQUEST['site']!=''){
$ven_sql=DB_query("select * from suppliers  where site in('".$_REQUEST['site']."')",$db);
$data1='<option value="">select</option>';
while($ven_res=DB_fetch_assoc($ven_sql))
{
  $data1.='<option value="'.$ven_res['id'].'">'.$ven_res['vendor_name'].'</option>';
}

$po_sql=DB_query("select * from purchorders  where site='".$_REQUEST['site']."'",$db);
$data2='<option value="">Select Vendor</option>';
while($po_res=DB_fetch_assoc($po_sql))
{
  $data2.='<option value="'.$po_res['id'].'">'.$po_res['purchase_ordNo'].'</option>';
}

echo $data1.'__'.$data2;
}
if($_REQUEST['vendor']!='')
{
  $po_sql=DB_query("select * from purchorders  where vendorId='".$_REQUEST['vendor']."'",$db);
$data3='<option value="">Select Vendor</option>';
while($po_res=DB_fetch_assoc($po_sql))
{
  $data3.='<option value="'.$po_res['id'].'">'.$po_res['purchase_ordNo'].'</option>';
}
echo $data3;
}
?>