Initial upload, docker environment

This commit is contained in:
2023-01-21 18:39:28 +01:00
commit c1b4875f4e
16 changed files with 2421 additions and 0 deletions

1795
src/adminer-4.8.1.php Normal file

File diff suppressed because one or more lines are too long

8
src/db_config.php Normal file
View File

@@ -0,0 +1,8 @@
<?php
$db_host = "postgres";
$db_name = "pvvmdb";
$db_user = "pvvmdb";
$db_pass= "pvvmdb";
?>

7
src/db_connect.php Normal file
View File

@@ -0,0 +1,7 @@
<?php
include_once 'db_config.php';
$dbconn = pg_connect("host=$db_host dbname=$db_name user=$db_user password=$db_pass")
or die('Could not connect: ' . pg_last_error());
?>

16
src/index.php Normal file
View 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]";
}
?>