Mam taki kod
<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
//do tego ifa wejdzie tylko gdy wyślesz formularz metodą post
var_dump($_POST);//to ci wypluje co masz w tej tablicy
require_once "connect.php";
$con = @new mysqli($host , $db_user, $db_password, $db_name);
$opd = "SELECT * FROM quiz Where anwser";
$anwser = $_POST['anwser'];
if($_POST['anwser'])
{
echo "Zdobywasz punkt";
}
else
{
echo "Brak punktu";
}
}
if(isset($_POST['anwser']) && $_POST['anwser'] == true){
//tu wejdzie tylko gdy będzie istnieć w tablicy post klucz anwser i klucz anwser bedzie równy true
}
?>
chce aby ten kod sprawdzał co jest w inpucie takim
<form action="quiz.php" method="post">
<li>1. (drink) I <input class="okienka" type="text" name="" value=""> much coffe.</li>
<li>2. (visit) We often <input class="okienka" type="text" name="" value=""> Mrs Grant.</li>
<li>3. (play) Henry <input class="okienka" type="text" name="" value=""> the piano better than Fred.</li>
<li>4. (begin) She <input class="okienka" type="text" name="" value=""> her job on Monday.</li>
<li>5. (listen) They <input class="okienka" type="text" name="" value=""> to music together.</li>
<li>6. (play) You <input class="okienka" type="text" name="" value=""> tennis twice a week.</li>
<li>7. (go) My brother <input class="okienka" type="text" name="" value=""> to pubs.</li>
<li>8. (play) You <input class="okienka" type="text" name="" value=""> tennis twice a week.</li>
<li>9. (work) They <input class="okienka" type="text" name="" value=""> in the office.</li>
<li>10. (like) We <input class="okienka" type="text" name="" value=""> pizza very much.</li>
<input class="h" class="zaloguj" type="submit" value="Sprawdź wynik">
</form>