„threadr/boards/thread.php“ ändern

master
Jakob 2020-03-02 09:13:10 +01:00
parent 477fc9517b
commit b1da1ceb6d
1 changed files with 17 additions and 1 deletions

View File

@ -3,6 +3,7 @@
session_start();
%NO_CHEAP_SESSION_STEALING%
$navbar="boards";
$id = $_GET["id"]
?>
<!DOCTYPE html>
<html>
@ -16,7 +17,22 @@ $navbar="boards";
%NAVBAR%
<div class="container">
<div class="item-1">
<h1><center>ThreadR Boards</center></h1>
<h1><center>
<?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 WHERE id=$id");
$statement->execute();
$statement->fetchAll() as $ROW
echo "$ROW[name]";
}
if (!$result) {
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
}
?>
</center></h1>
</div>
</div>
</body>