<?php
$host = 'localhost';
$user = 'ntsazwmq_bmyaaauser';
$pass = '@Anupsinha@321';
$dbname = 'ntsazwmq_bmyaaa';

try {
    $pdo = new PDO("mysql:host=$host", $user, $pass);
    $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
    
    // Read and execute SQL file
    $sql = file_get_contents('bmyo_database.sql');
    $pdo->exec($sql);
    
    echo "<h2 style='color:green'>✅ Database created successfully!</h2>";
    echo "<p>Database: <strong>$dbname</strong></p>";
    echo "<p>Admin: <strong>admin@bmyouth.org</strong></p>";
    echo "<p>Password: <strong>Admin@123</strong></p>";
    
} catch(PDOException $e) {
    echo "<h2 style='color:red'>Error: " . $e->getMessage() . "</h2>";
}
?>