<?php 
require_once('Connections/localhost.php'); 
mysql_select_db($database_localhost,$localhost);
$productID = $_POST['productID'];
if($productID == "All"){
	$query1 = mysql_query("select * from tbl_product");
}
else{
	$query1 = mysql_query("select * from tbl_product where product_ID = '$productID'");
}
//$row = mysql_fetch_array($query1);
$i = 1;
echo "Y%";
while ($row=mysql_fetch_array($query1))
{
	if($i <= 30 && $i > 20){
		$tempID = $row['product_ID'];
		$query2 = mysql_query("select * from tbl_introprod where product_ID = '$tempID'");
		while($row2=mysql_fetch_array($query2)){
		$location = $row2['wareHouse'].$row2['location'];
			echo "".$row['product_ID']."%".$row['product_NAME']."%".$row['product_TYPE']."%".$row2['timeToIn']."%".$row2['expireDay']."%".$row2['product_QUANTITY']."%".$row2['OWNER']."%".$row2['personForHander']."%".$location."%";
		}
	}
	$i = $i + 1;
}
echo " a";
//mysql_query("Insert into mydatabase.tbl_user values('$ID','$useremail','$password')");

 //echo "<script language='javascript'>alert(".$row['username'].")</script>";
?>