Initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$host = 'localhost';
|
||||
$dbname = 'spbu_db'; // Change if your database name is different
|
||||
$username = 'root'; // Default XAMPP username
|
||||
$password = ''; // Default XAMPP password is empty
|
||||
|
||||
try {
|
||||
$pdo = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
|
||||
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||||
} catch (PDOException $e) {
|
||||
die("Database connection failed: " . $e->getMessage());
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user