<?php
include("includes/config.php");
include("classes/safeSQL.class.php");

if(isset($_POST['Q1']))
{
	$Order_NO	=	$_POST['Q1'];	
}

	$Query	=	mysql_query("SELECT * FROM `purchaseorder` where OrderNo = '$Order_NO'");

	$Number_of_Rows	=	mysql_num_rows($Query);

	if($Number_of_Rows > 0)
	{
		echo "1";	
	}else{
		echo "0";	
	}
?>