Initial commit: Flutter app + PHP/MySQL backend on Hostinger
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>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?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;
|
||||
}
|
||||
Reference in New Issue
Block a user