„threadr/boards/index.php“ ändern
parent
1f04842feb
commit
368d93b997
|
@ -6,11 +6,10 @@
|
|||
</head>
|
||||
<body>
|
||||
<?php
|
||||
try {
|
||||
$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->execute();
|
||||
|
||||
|
@ -21,11 +20,10 @@
|
|||
}
|
||||
echo "</ul>"
|
||||
}
|
||||
catch(PDOException $Exception) {
|
||||
|
||||
if (!$result) {
|
||||
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
|
||||
}
|
||||
|
||||
$pdo = null;
|
||||
?>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue