--- a/config.php +++ b/config.php @@ -1,109 +1,111 @@ setAttribute(PDO::ATTR_ERRMODE, - PDO::ERRMODE_EXCEPTION); - } - catch(PDOException $e) { + $db->setAttribute(PDO::ATTR_ERRMODE, + PDO::ERRMODE_EXCEPTION); +} catch (PDOException $e) { // Print PDOException message echo $e->getMessage(); - } +} -function includeHeader($title) { -?> - - - - - - - - - +function includeHeader($title) +{ + ?> + + + + + + + + + - Starter Template for Bootstrap + Starter Template for Bootstrap - - - + - + + + + + - - + + - - - + + + - + - - -
-
-
-
+
+
+
getMessage(); - } -?> +function includeFooter() +{ + global $db; + try { + /************************************** + * Close db connections * + **************************************/ -
- - -getMessage(); + } + ?> + + + + +