<?php
$servername = "localhost";
$username   = "username_database";
$password   = "password_database";
$database   = "nama_database";

$conn = new mysqli($servername, $username, $password, $database);

if ($conn->connect_error) {
   echo "Koneksi database gagal";
}

?>