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