<?php
// Database configuration - include this in all your PHP files
// Database connection settings
define('DB_HOST', 'localhost');
define('DB_NAME', 'hosting_platform');
define('DB_USER', 'root');
define('DB_PASS', 'test'); // Replace with your actual password
// Create PDO connection function
function getDB() {
try {
$pdo = new PDO(
"mysql:host=" . DB_HOST . ";dbname=" . DB_NAME,
DB_USER,
DB_PASS,
[
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC
]
);
return $pdo;
} catch(PDOException $e) {
die("Database connection failed: " . $e->getMessage());
}
}
// Other platform settings
define('SITE_URL', 'http://108.61.85.3');
define('ADMIN_EMAIL', 'admin@olinsspot.com');
define('DEFAULT_AI_CREDITS', 100);
?>