スパム対策システムのようなものを作りたいのですが、この HTML があります:
What is <?php echo $six; ?> + <?php echo $rand1; ?> <input type="text" name="human" id="human">
そして、これらの変数について:
$human = @$_POST['human'];
$rand1 = rand(1, 9);
$six = 6;
$res = $rand1 + $six;
それから私は:
if($human==$res){
echo "Correct";
}else{
echo "Incorrect";
}
これは機能していません。何か案は?