mysql_connect($username,$password,$db);
$query = "SELECT email FROM members WHERE email='$email' ";
$result = mysql_query($query);
if(mysql_error()){
print (mysql_error()."<BR>");
print ($query."<BR>");
exit;
}
if(mysql_num_rows($result) > 0){
print($email." already exists");
}else{
// new mail processing
}
Try this out, if there is an error in the SQL it will display it, lemme know if it works