Hi in the add page, before record added, i use this code to prevent users insert records double,
but if I inserted a number with a comma instead of a point,the control jumps. How can i do?
The values to check is Litri.
global $conn;
$DA = $values["Data"];
$TA = $values["IdTarga"];
$LI = $values["Litri"];
$strSQLExists = "select * from tabellaspese where Data='".$DA."' and IdTarga='".$TA."' and Litri='".$LI."'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
$message = "<div class=message>DOCUMENTO GIA' INSERITO!!</div>";
return false;
}
else
{
--rbegin--// if dont exist do something else--rend--
$values["LastUser"]=$_SESSION["UserID"];
}
return true;