|
|
@@ -13,6 +13,22 @@
|
|
|
<body>
|
|
|
<div class="container">
|
|
|
<h1>Racing Australia</h1>
|
|
|
+ <?php
|
|
|
+ require_once 'dbconfig.php';
|
|
|
+ $dsn = "pgsql:host=$host;port=5432;dbname=$db;user=$username;password=$password";
|
|
|
+ try{
|
|
|
+ // create a PostgreSQL database connection
|
|
|
+ $conn = new PDO($dsn);
|
|
|
+
|
|
|
+ // display a message if connected to the PostgreSQL successfully
|
|
|
+ if($conn){
|
|
|
+ echo "Connected to the <strong>$db</strong> database successfully!";
|
|
|
+ }
|
|
|
+ }catch (PDOException $e){
|
|
|
+ // report error message
|
|
|
+ echo $e->getMessage();
|
|
|
+ }
|
|
|
+ ?>
|
|
|
</div>
|
|
|
<!-- Optional JavaScript -->
|
|
|
<!-- jQuery first, then Popper.js, then Bootstrap JS -->
|