投稿に複数の回答を含めるにはどうすればよいですか? また、大文字を区別しないようにする方法を理解できれば、それも役に立ちます。
次に例を示します。
$a = "What is the color of the sky?"
if($_POST['ans'] == "blue") {
echo "Correct!";
}
形:
<form method="POST" action="">
<input type="text" name="ans" /><br />
<input type="submit" />
</form>
私が試してみました
if($_POST['ans'] == "blue" . "Blue") {
echo "Correct!";
}
と
if($_POST['ans'] == "blue" or "Blue") {
echo "Correct!";
}