„threadr/boards/index.php“ ändern
parent
89aded6535
commit
1dadb99d8b
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue