<?php

$dbhost = "mysql";
$dbuser = $_ENV['DB_USER_NAME'];
$dbpass = $_ENV['DB_PASS'];
$dbname = "ksp";

try {
    $con = new PDO("mysql:host=$dbhost;dbname=$dbname", $dbuser, $dbpass);
    $con->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
    $con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOExeption $e) {
    print "Error!: " . $e->getMessage() . "<br/>";
    die();
}