21 lines
548 B
PHP
21 lines
548 B
PHP
<?php
|
|
// RS Learning Lab - basic DB config
|
|
// NOTE: change db_name, username, password based on your XAMPP setup
|
|
|
|
$host = 'localhost';
|
|
$db_name = 'rs_lab'; // create this DB in phpMyAdmin
|
|
$db_user = 'root'; // default XAMPP user
|
|
$db_pass = ''; // default XAMPP password (empty)
|
|
|
|
// Create connection
|
|
$conn = new mysqli($host, $db_user, $db_pass, $db_name);
|
|
|
|
// Check connection
|
|
if ($conn->connect_error) {
|
|
die("Database connection failed: " . $conn->connect_error);
|
|
}
|
|
|
|
// Set charset
|
|
$conn->set_charset("utf8mb4");
|
|
?>
|