rename file

This commit is contained in:
csimonis 2024-09-17 15:39:26 +02:00
commit 6318f3e89b
2 changed files with 1 additions and 1 deletions

View file

@ -0,0 +1,22 @@
<?php
$antwort1 = $_POST['frage-1'];
$antwort2 = $_POST['frage-2'];
$antwort3 = $_POST['frage-3'];
function zeigeErgebnis(string $gegebeneAntwort, string $richtigeAntwort): void
{
if ($gegebeneAntwort === $richtigeAntwort) {
echo 'richtig';
} else {
echo "falsch ($richtigeAntwort)";
}
}
?>
<h2>Antwort 1 ist <?php zeigeErgebnis($antwort1, 'Hund') ?>
</h2>
<h2>Antwort 2 ist <?php zeigeErgebnis($antwort2, 'Blau'); ?>
</h2>
<h2>Antwort 3 ist <?php zeigeErgebnis($antwort3, 'Banane'); ?>
</h2>