The code you've given is fine; the problem must lie elsewhere (are $status1 and $status2 what they should be, for example?).
To test, deliberately clobber $status1 or $status2 (or both) to see what happens. I.e., immediately before the if() statement, insert lines
$status1="win";
$status2="win";
And see what happens when you change either/both "win"s to something else. If it starts behaving as expected, then $status1 and/or $status2 had the wrong values before you got to the if() statement.