<?php
require_once("include/dbcommon.php"); // DataBase PHPRunner


$valor = $_POST['volumen'];

// Get the highest value that exists in the database
$rs = DB::Query("SELECT max_recarga FROM `orodiint_bsn`.`promocion` 
where estado =  1 ");
$maxValor = $rs->value("max_recarga"); //  To control if there is a response to the query
if ( $maxValor == NULL ) {
	$maxValor = 0; 										//  If there is no record loaded puts the value 0
}

if ( $valor  <=  $maxValor) { // Compare if correct entered value 
	echo "1;$maxValor;Ok, Good answer";
} else {
	echo "2;$maxValor;Error, the Valor is not correct";
}


?>
