Hey guys,
I have an if/else statement that isn’t working. The statement is this:
if ($score1 == 0) {
$wins = $old_Score1;
} else if ($score1 > $rows['score1'] && $rows['score1'] > 0) {
$wins = $old_Score1;
} else if ($score1 < $rows['score1'] && $rows['score1'] > 0) {
$wins = $old_Score1;
} else if ($score1 > 0 && $rows['score1'] == 0) {;
$wins = $old_Score1 + 1;
} else if ($score1 == 0 && $rows['score1'] > 0) {
$wins = $old_Score1 - 1;
}
The form is working correctly and all the variables are coming through, I just think the problem is something with the operators in this part:
} else if ($score1 > $rows['score1'] && $rows['score1'] > 0) {
Can someone tell me what I am doing wrong?