From 34ecc4e17009613a1aa9142c032242c185eee7b3 Mon Sep 17 00:00:00 2001 From: Josh Ashton Date: Thu, 17 Apr 2025 15:06:56 -0600 Subject: [PATCH] update db --- hashbrown/includes/functions.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/hashbrown/includes/functions.php b/hashbrown/includes/functions.php index 1238697..4a3ef5d 100755 --- a/hashbrown/includes/functions.php +++ b/hashbrown/includes/functions.php @@ -3,11 +3,18 @@ $db_pass = $_ENV['DATABASE_PASSWORD']; $ip_addr = $_ENV['IP_ADDRESS']; +if ($_SERVER['HTTP_HOST'] == 'localhost') { + define('HOST', 'localhost'); + define('USER', 'root'); + define('PASS', $db_pass); + define('DB', 'secureusers'); +} else { + define('HOST', $ip_addr); + define('USER', 'root'); + define('PASS', $db_pass); + define('DB', 'secureusers'); +} // Make some constants -define('HOST', 'localhost'); -define('USER', 'root'); -define('PASS', $db_pass); -define('DB', 'secureusers'); function table_from_file($file) {