<% Function checkEmailExists(str_email,str_cid) IF str_email <> "" AND str_cid <> "" THEN str_email=trim(str_email) str_cid=trim(str_cid) SET rsEChk = dbCBK.Execute("SELECT `email` FROM cbk_customers WHERE `email` = '"&str_email&"' AND `companyID` = '"&str_cid&"' limit 1") IF rsEChk.EOF THEN checkEmailExists = "NOTFOUND" ELSE checkEmailExists = "EXISTS" END IF rsEChk.Close SET rsEChk = Nothing ELSE checkEmailExists = "FAILED" END IF End Function %>