tugas-pjpb/config.php

16 lines
480 B
PHP
Raw Permalink Normal View History

2022-10-02 16:13:30 +07:00
<?php
/* Database credentials. Assuming you are running MySQL
server with default setting (user 'root' with no password) */
2022-10-26 17:00:26 +07:00
define('DB_SERVER', '127.0.0.1');
define('DB_USERNAME', 'dbusr');
define('DB_PASSWORD', 'securepwd');
define('DB_NAME', 'appdb');
2022-10-02 16:13:30 +07:00
/* 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());
}
?>