<?
require_once('Connections/localhost.php'); 
mysql_select_db($database_localhost,$localhost);

//$productID = "P002.N00002";

$productID = $_POST['productID'];
$idSub = substr($productID, -11, 4);
$codeSub = substr($productID, -6, 6);

date_default_timezone_set('Etc/GMT-8');
$dateToday = date('Y-m-d', time());


//echo "<script>alert('".$productType."');</script>";

$query_search = "select * from tbl_product where product_ID = '$idSub'";
$query_search2 = "select * from tempid";
$query_search3 = "select * from tbl_introprod where product_ID = '$idSub' AND codeNum = '$codeSub'";
$query_exec = mysql_query($query_search) or die(mysql_error());
$query_exec2 = mysql_query($query_search2) or die(mysql_error());
$query_exec3 = mysql_query($query_search3) or die(mysql_error());
$rows = mysql_num_rows($query_exec);
$row = mysql_fetch_array($query_exec);
$row2 = mysql_fetch_array($query_exec2);
$row3 = mysql_fetch_array($query_exec3);


//$result = mysql_query("insert into tbl_introprod (product_ID,timeToIn,product_QUANTITY,expireDay,personForHander,OWNER,codeNum) value ('$OwnerID','$ownerName','$Address','$handphone','$Sex','$Birthday','$Email')");
//$row = mysql_fetch_array($result);
echo "Y%";
echo "".$row['product_ID']."%".$row['product_NAME']."%".$row['product_TYPE']."%".$dateToday."%".$row3['expireDay']."%".$row3['product_QUANTITY']."%".$row3['OWNER']."%".$row3['personForHander']."%";
echo " a";

?>

