In other words, you need to get the values into an array before you do your IF statements...
$check = "SELECT username,email FROM members WHERE username = '$username' OR email = '$email'";
$result = mysql_query($check);
// Add this line
$row = mysql_fetch_array($result);
// Change these lines
if ($row['username']) {
$num_rows_user = mysql_num_rows($result);
}
if ($row['email']) {
$num_rows_email = mysql_num_rows($result);
}