php-mpos/public/include/database.inc.php
2013-05-10 15:28:05 +02:00

15 lines
360 B
PHP

<?php
// Make sure we are called from index.php
if (!defined('SECURITY'))
die('Hacking attempt');
// Instantiate class, we are using mysqlng
$mysqli = new mysqli($config['db']['host'], $config['db']['user'], $config['db']['pass'], $config['db']['name']);
/* check connection */
if (mysqli_connect_errno()) {
die("Failed to connect to database");
}
?>