diff options
author | Ian C <ianc@noddybox.co.uk> | 2018-06-22 13:27:11 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2018-06-22 13:27:11 +0000 |
commit | 840c543df8fa62a0417e53c632751f03185f17a4 (patch) | |
tree | 2001491cbd0cf5dd6be16accbb573caad20a759f /www/common.php | |
parent | 7964a8ba3dd041511c483b7f220b6d14d71ef69e (diff) |
Fixed up data access pages.
Diffstat (limited to 'www/common.php')
-rw-r--r-- | www/common.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/www/common.php b/www/common.php index 52971eb..a86d7b7 100644 --- a/www/common.php +++ b/www/common.php @@ -19,10 +19,14 @@ function ConnectDB() { + global $config; + $pdo = new PDO("mysql:host=localhost;dbname={$config["dbname"]}", $config["dbuser"], $config["dbpassword"]); + $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); return $pdo; } + ?> |