php-mpos/public/include/database.inc.php
2013-12-20 02:02:38 +01:00

15 lines
383 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'], $config['db']['port']);
/* check connection */
if (mysqli_connect_errno()) {
die("Failed to connect to database");
}
?>