shopping-list/php/connect.php

15 lines
333 B
PHP
Raw Normal View History

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