function validateAddition($var_list) { global $conn; $arr_check = array("open", "closed", "escalated"); if (in_array(strtolower(trim($var_list)), $arr_check) == true) { return false; } $sql = "Select vLookUpValue from sptbl_lookup where vLookUpName='ExtraStatus' and vLookUpValue='{$var_list}'"; $var_result = executeSelect($sql, $conn); if (mysql_num_rows($var_result) > 0) { return false; } elseif (isValidStatus($var_list)) { return true; } }
function validateAddition() { global $conn; //check priroty value exist if (!isValidStatus($_POST['txtExtraPrty'])) { return false; } $sql = "Select * from sptbl_priorities where nPriorityValue='" . mysql_real_escape_string($_POST['cmbValue']) . "'"; $sql .= " or vPriorityDesc='" . mysql_real_escape_string($_POST['txtExtraPrty']) . "'"; if (mysql_num_rows(executeSelect($sql, $conn)) > 0) { return false; } return true; }