unfortunately CoolDude's suggestion did not return any errors.
If you would like to see the entire function, here it is.
function ValidateExistingEmail($strNewEmail){
global $salesContactName;
$DatabaseConnection = mysql_connect("mysql.imagine-hosting.com", "****", "****") or die(mysql_error());
mysql_select_db("netcomm", $DatabaseConnection) or die(mysql_error());
$strNewEmail = strtoupper($strNewEmail);
$sql = "SELECT * FROM tblPartner_EmailSubscription WHERE UPPER(salesManagerEmail) = '$strNewEmail' OR UPPER(salesContactEmail) = '$strNewEmail';";
$result = mysql_query($sql, $DatabaseConnection) or die(mysql_error());
while ($row = mysql_fetch_array($result)){
if ( ($row["SalesManagerEmail"] == $strNewEmail) ){
// sales contact added
$salesContactName = $row["SalesManager"];
mysql_close($DatabaseConnection);
return "FAILED";
}else if ( ($row["SalesContactEmail"] == $strNewEmail) ){
// sales contact added
$salesContactName = $row["SalesContact"];
mysql_close($DatabaseConnection);
return "FAILED";
}
}
return "PASS";
}
The operators aren't going to do anything. As I said before, I tried this query in phpmyadmin, and there is no problem there. By substituting $strNewEmail for a value that I know is in the database, there is always a row of data returned.