Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 15 additions & 3 deletions php/structure/users.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,21 @@
# commented it out because we don't actually want it to be fatal
}

echo "<pre>";
var_dump($results->fetchAll(PDO::FETCH_ASSOC));
echo "</pre>";
if (isset($results) && $results) {
$users = $results->fetchAll(PDO::FETCH_ASSOC);
echo "<ul>\n";
foreach ($users as $user) {
echo "<li>\n";
foreach ($user as $key => $value) {
if (stripos($key, 'password') !== false) {
continue; // Skip sensitive fields
}
echo htmlspecialchars($key) . ": " . htmlspecialchars((string)$value) . "<br>\n";
}
echo "</li>\n";
}
echo "</ul>\n";
}

include 'footer.php';

Expand Down