b239ae3e5f
Replaces Firebase with a self-hosted PHP/MySQL API served from winded.prymsolutions.com. Includes full backend (schema, auth, events, teams, brackets, suggestions, stats, media, file upload) and updated Flutter repositories and domain models. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
23 lines
793 B
PHP
23 lines
793 B
PHP
<?php
|
|
// Copy this file to config.php and fill in your Hostinger MySQL credentials.
|
|
// Never commit config.php to version control.
|
|
|
|
define('DB_HOST', 'localhost');
|
|
define('DB_NAME', 'u595523489_wndd'); // e.g. u123456789_winded
|
|
define('DB_USER', 'u595523489_wnddusr'); // e.g. u123456789_winded
|
|
define('DB_PASS', '@>fnr0E7eS');
|
|
define('DB_CHARSET', 'utf8mb4');
|
|
|
|
function db(): PDO {
|
|
static $pdo = null;
|
|
if ($pdo === null) {
|
|
$dsn = 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME . ';charset=' . DB_CHARSET;
|
|
$pdo = new PDO($dsn, DB_USER, DB_PASS, [
|
|
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
|
|
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
|
|
PDO::ATTR_EMULATE_PREPARES => false,
|
|
]);
|
|
}
|
|
return $pdo;
|
|
}
|