you could make this alot better if you did something like
CODE
$digitOne = rand(1,99);
$digitTwo = rand(1,99);
$answer = $digitOne + $digitTwo;
//filteredpost being sanatised $_POST array
if(is_numeric($filteredPost['answer'])){
if(intval($filteredPost['answer']) == $answer){
//let em through
} else {
//invalid answer but was numeric.
}
//not even numeric...could be a spam attempt, however dont assume.
}
If you find bots still coming through then you can easily ramp it up a little by making your calculation operator be something other than addition. so for instance
CODE
$digitOne = rand(1,99);
$digitTwo = rand(1,99);
$operators = array('+','-','/','^');
$pickedOp = $operators[rand(0, count($operators))];
//need to use eval as we are turning a string into arithmetic
eval("\$answer=".$digitOne.$pickedOp.$digitTwo.";");
//$answer will hold the real answer.