Database connection in PHP 7 code example
Example: php database connection >=5.6
$user = 'root';
$password = 'root';
$db = 'inventory';
$host = 'localhost';
$port = 8889;
$link = mysqli_init();
$success = mysqli_real_connect(
$link,
$host,
$user,
$password,
$db,
$port
);