<?php

include "validate.php";



if(isset($_POST['quantity']))

{

$item = $_POST['item'];

$quantity = $_POST['quantity'];

$query="SELECT quantity FROM ".$prefix."stock WHERE titleID='$item'";

//echo $query;

$sql_check = mysql_query($query);

$rows=mysql_fetch_row($sql_check);



if($rows[0]>=$quantity)

{

echo 'OK';

}

else if($rows[0]<$quantity)

{

echo 'NOT';

}



}



?>