//** Check if specific record exists ****
global $conn;
$strSQLExists = "select from Forms-App
where UserID='" . $values["UserID"] . "'";
$rsExists = db_query($strSQLExists,$conn);
$data=db_fetch_array($rsExists);
if($data)
{
// if record exists continue on
}
else
{
// if dont exist do Stop and give message
$message = "UserID" . $values["UserID"] . " Missing FORMS - Please add them now ";
return true;
}
This worked before I changed the part in the select statement from
$strSQLExists = "select from Forms where UserID='" . $values["UserID"] . "'";
to
$strSQLExists = "select * from Forms-App
where UserID='" . $values["UserID"] . "'";
Now it bypasses it without the message even if the does not exist.