localhost and server configuration are the same.

This commit is contained in:
2025-02-08 00:54:05 +00:00
parent 6bf1b9669d
commit b8052613ef
+4 -11
View File
@@ -6,17 +6,10 @@ $dotenv->safeLoad();
$db_pass = $_ENV['DATABASE_PASSWORD']; $db_pass = $_ENV['DATABASE_PASSWORD'];
// Make some constants // Make some constants
if ($_SERVER['HTTP_HOST'] == 'localhost') { define('HOST', '173.255.248.228');
define('HOST', 'localhost'); define('USER', 'root');
define('USER', 'root'); define('PASS', $db_pass);
define('PASS', $db_pass); define('DB', 'palindromes');
define('DB', 'palindromes');
} else {
define('HOST', 'cs2440.joshashton.dev');
define('USER', 'root');
define('PASS', $db_pass);
define('DB', 'palindromes');
}
// Connect to the DB // Connect to the DB
$conn = mysqli_connect(HOST, USER, PASS, DB); $conn = mysqli_connect(HOST, USER, PASS, DB);