finish auftakt files

This commit is contained in:
csimonis 2024-09-17 14:26:29 +02:00
parent 29aa8a9615
commit 756db9412d
2 changed files with 16 additions and 13 deletions

@ -1,5 +1,17 @@
<form action="http://localhost:8080/auftakt/submit.php" method="POST">
<h1>yo. what's 9+10</h1>
<input type="number" value="0" placeholder="nummer" name="number">
<form action="/auftakt/" method="POST">
<h1>Was ist 7 X 8</h1>
<label>Deine Antwort:
<input type="number" placeholder="nummer" name="number" required>
</label>
<button type="submit">Abgeben</button>
</form>
</form>
<?php
if (isset($_POST['number'])) {
$number = $_POST['number'];
if ($number === '56') {
echo "richtig";
} else {
echo "falsch";
}
}

@ -1,9 +0,0 @@
<?php
$number = $_POST['number'];
if ($number === '21') {
echo "richtig";
} else {
echo "falsch";
}