Files
portal_v3/admin/playground/_old/database.php
equippedcoding-master e2c98790b2 initial commit
2025-09-17 09:37:06 -05:00

22 lines
617 B
PHP

<?php
require dirname( __DIR__, 2 ) . "/portal/dashboard/core/api/php/init.php";
$host = $GLOBALS['config']['mysql']['host'];
$dbname = $GLOBALS['config']['mysql']['db'];
$username = $GLOBALS['config']['mysql']['username'];
$password = $GLOBALS['config']['mysql']['password'];
// var_dump($GLOBALS['config']['mysql']);
$mysqli = new mysqli(hostname: $host,
username: $username,
password: $password,
database: $dbname);
if ($mysqli->connect_errno) {
die("Connection error: " . $mysqli->connect_error);
}
return $mysqli;