if ($message) { if ($answer == $n1 + $n2) { $correct += 1; $message = "Very good."; } else { $message = "No, that was not the right answer."; } $total += 1; $message .= " Score now: $correct out $total "; $n1 = rand(-50, 50); $n2 = rand(-50, 50); $question = "What is $n1 + $n2? "; } else { $message = "Welcome to the game."; $n1 = rand(-50, 50); $n2 = rand(-50, 50); $correct = 0; $total = 0; $message .= " Score now: $correct out of $total "; $question = "What is $n1 + $n2? "; } ?>