comment.php
$a = RAND(1,20);
$b = RAND(1,20);
$c = $a + $b;
echo "<input type=\"hidden\" value=\"$c\" id=\"botcheck\" name=\"botcheck\">";
echo "<div class=\"typeof\"><b>Spam Filter:<br>$a + $b = ?</b></div><div><input type=\"text\" id=\"botcheckanswer\" name=\"botcheckanswer\"></div><br>";
addcomment.php
if($_POST['botcheck'] != $_POST['botcheckanswer']){
echo "You have failed the spam filter. Please try again.";
}else....
The coding works fine, if you enter in the correct sum then it will post, if not it will fail to post. My question here is it too basic and will bots get past this line of defense?