diff --git a/threadr/boards/index.php b/threadr/boards/index.php
index 27c49e7..f945385 100644
--- a/threadr/boards/index.php
+++ b/threadr/boards/index.php
@@ -20,12 +20,12 @@ $navbar="boards";
- prepare("SELECT * FROM boards WHERE public = '1' ORDER BY id asc");
+ $statement = $pdo->prepare("SELECT * FROM boards WHERE private='0' ORDER BY id asc");
$statement->execute();
foreach($statement->fetchAll() as $ROW) {
echo "- $ROW[name]
";
@@ -34,9 +34,12 @@ $navbar="boards";
if (!$result) {
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
}
+
if ($login) {
+ $error = false;
+ $error_message = "";
if (!$error) {
- $statement = $pdo->prepare("SELECT * FROM boards WHERE public='0' ORDER BY id asc");
+ $statement = $pdo->prepare("SELECT * FROM boards WHERE private='1' ORDER BY id asc");
$statement->execute();
foreach($statement->fetchAll() as $ROW) {
echo "- $ROW[name]
";
@@ -46,7 +49,6 @@ $navbar="boards";
$error_message = "Error: SQL error.\n" . $statement->queryString . "\n" . $statement->errorInfo()[2];
}
}
- */
?>