„threadr/boards/index.php“ ändern

master
Erik 2020-03-02 08:40:56 +01:00
parent 89aded6535
commit 1dadb99d8b
1 changed files with 15 additions and 16 deletions

View File

@ -18,22 +18,20 @@ $navbar="boards";
<div class="item-1">
<h1><center>ThreadR Boards</center></h1>
</div>
<div class="item-2 shadow">
<div class="item-2">
<div class="shadow">
<ul class="list">
<?php
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
$error = false;
$error_message = "";
if (!$error) {
$statement = $pdo->prepare("SELECT * FROM boards");
$statement->execute();
foreach($statement->fetchAll() as $ROW) {
echo "<li><a href='%CONTENT_DIR%/boards?=$ROW[id]'>$ROW[name]</a></li>";
}
}
if (!$result) {
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
}
@ -41,5 +39,6 @@ $navbar="boards";
</ul>
</div>
</div>
</div>
</body>
</html>