This commit is contained in:
2019-07-04 08:49:40 +02:00
parent 1f1fcae8ab
commit 6ec9ce623b
2 changed files with 117 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
<?php
require_once(__DIR__ . 'Database.php');
echo <<<END
<h1>Fragen anzeigen</h1>
<table>
<tr>
<td>Frage</td>
<td>Antwort0</td>
<td>Antwort1</td>
<td>Antwort2</td>
<td></td>
<td></td>
</tr>
END;
$db = new Database();
$questions = $db->getQuestions();
foreach($questions as $question) {
echo("<tr>");
echo("<td>$question->question</td>");
echo("<td>$question->answer0</td>");
echo("<td>$question->answer1</td>");
echo("<td>$question->answer2</td>");
echo("<td>$question->solution</td>");
echo("</tr>");
}
echo <<<END
</table>
<br><br>
<a href="questions-create.php">Frage hinzufügen</a>
END;
?>