Initial upload, docker environment
This commit is contained in:
16
src/index.php
Normal file
16
src/index.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
include('./db_connect.php');
|
||||
|
||||
|
||||
$res = pg_query($dbconn, "SELECT * FROM users");
|
||||
if (!$res) {
|
||||
echo "An error occurred.\n";
|
||||
exit;
|
||||
}
|
||||
|
||||
while ($row = pg_fetch_row($res)) {
|
||||
echo "id: $row[0] username: $row[1]";
|
||||
}
|
||||
|
||||
?>
|
Reference in New Issue
Block a user