summaryrefslogtreecommitdiff
path: root/www/common.php
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2018-06-22 13:27:11 +0000
committerIan C <ianc@noddybox.co.uk>2018-06-22 13:27:11 +0000
commit840c543df8fa62a0417e53c632751f03185f17a4 (patch)
tree2001491cbd0cf5dd6be16accbb573caad20a759f /www/common.php
parent7964a8ba3dd041511c483b7f220b6d14d71ef69e (diff)
Fixed up data access pages.
Diffstat (limited to 'www/common.php')
-rw-r--r--www/common.php4
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;
}
+
?>