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

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


$query = "select * from tbl_introprod where product_ID = '$idSub' and codeNum = '$codeSub'";
$query_exec = mysql_query($query) or die(mysql_error());
$row2 = mysql_fetch_array($query_exec);
$rows = mysql_num_rows($query_exec);

$allQuan = $row2['product_QUANTITY'];
if($quan <= $allQuan){
	echo "Y";
}
else{echo "N";}


?>