The form:
<form method="POST" action="handling.php"> <div class="exercise_sentences"> <label for='first' class="sent_1">Right answer</label> <input type="text" name="first"> <label for='second' class="sent_2">Wrong answer</label> <input type="text" name="second"> <label for='third' class="sent_3">Wrong answer</label> <input type="text" name="third"> <input class="button" type="submit" name="check" value="Проверить"> </div> handling.php:
<?php if ($_POST['first'] == "Right answer" and $_POST['second'] == "Wrong answer" POST['third'] == "Wrong answer") { printf("<span style='color: green'>Все правильно!</span>"); } else { echo "Что-то не так, проверь еще раз!"; } ?> The answer gives, respectively, to /handling.php, but then you need to re-markup.
Is it possible to leave all the markup of the site to change only the color of the text, if it is written correctly \ not correctly (Ie, according to the specified parameters)?
Did I move in the right direction?
Is it possible to remove case sensitivity in response? For example, to accept both the Right answer and the right anSwEr.
The answer on the Internet did not find. I will be grateful.