„threadr/boards/index.php“ ändern

master
Jakob 2020-02-19 22:26:06 +01:00
parent 368d93b997
commit 1778e13ad5
1 changed files with 8 additions and 7 deletions

View File

@ -1,24 +1,25 @@
<!DOCTYPE html>
<html>
<head>
<head>
<title>ThreadR Boards</title>
<link rel="stylesheet" type="text/css" href="%CONTENT_DIR%/style.css">
</head>
</head>
<body>
<?php
$pdo = new PDO('mysql:host=localhost;dbname=web', 'webstuff', 'Schei// auf Pa$$w0rter!');
$error = false;
$error_message = "";
if (!$error) {
$statement = $pdo->prepare("SELECT name FROM boards");
$statement = $pdo->prepare("SELECT * FROM boards");
$statement->execute();
echo "<ul class="topnav">"
foreach($statement->fetchAll() as $ROW) {
echo "
<li><a href='%CONTENT_DIR%/boards#$ROW[id]'>$ROW[name]</a></li>";
echo "<li><a href='%CONTENT_DIR%/boards?=$ROW[id]'>$ROW[name]</a></li>";
}
echo "</ul>"
}
if (!$result) {