tugas-pjpb/config.php
2022-10-26 17:00:26 +07:00

16 lines
480 B
PHP

<?php
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
define('DB_SERVER', '127.0.0.1');
define('DB_USERNAME', 'dbusr');
define('DB_PASSWORD', 'securepwd');
define('DB_NAME', 'appdb');
/* Attempt to connect to MySQL database */
$link = mysqli_connect(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);
// Check connection
if($link === false){
die("ERROR: Could not connect. " . mysqli_connect_error());
}
?>