1
1
mirror of https://github.com/neosubhamoy/neosubhamoy-portfolio.git synced 2025-12-20 02:19:34 +05:30

(refactor): changed connection.php credentials into .env

This commit is contained in:
2023-12-11 01:08:55 +05:30
parent 88839cd861
commit 6eeba2f01a
8 changed files with 35 additions and 15 deletions

View File

@@ -0,0 +1,15 @@
<?php
//Collect Database info
$hostname = $_ENV['DB_HOST'];
$username = $_ENV['DB_USER'];
$password = $_ENV['DB_PASS'];
$database = $_ENV['DB_NAME'];
//Connect with Database
$conn = new mysqli($hostname, $username, $password, $database);
if ($conn -> connect_error) {
die("Database Connection Failed !" . $conn->connect_error);
}
echo "";
?>