shopping-list/php/connect.php
2019-06-03 14:25:48 +02:00

15 lines
365 B
PHP

<?php
include $_SESSION["docroot"].'/config/config.php';
$mysqli = new mysqli(
$host = $CONFIG['host'],
$username = $CONFIG['username'],
$passwd = $CONFIG['passwd'],
$database = $CONFIG['database']
);
$mysqli->set_charset("utf8");
if (!is_null($mysqli->connect_error))
{
header("Location: /error/DBConnFailed");
exit;
}
?>