This commit is contained in:
Evelyn 2025-12-17 10:36:48 +07:00
parent f1c677b005
commit dab3e2c8b0
2 changed files with 9 additions and 1 deletions

View File

@ -5,7 +5,7 @@ $user = "root";
$password = "";
$database = "users_db";
$conn = new mysqli("localhost", "root", "", "users_db", 3307);
$conn = new mysqli($host, $user, $password, $database);
if ($conn->connect_error) {
die("Koneksi gagal: " . $conn->connect_error);

8
test_db.php Normal file
View File

@ -0,0 +1,8 @@
<?php
$conn = new mysqli("localhost", "root", "", "users_db", 3307);
if ($conn->connect_error) {
die("❌ GAGAL: " . $conn->connect_error);
}
echo "✅ KONEKSI BERHASIL";
?>