<?php
// Simple test file to check if PHP and database connection works

echo "<h2>Testing PHP and Database Connection</h2>";

try {
    require_once 'config/database.php';
    echo "<p style='color: green;'>✅ Database connection successful!</p>";
    
    // Test getting a setting
    require_once 'includes/site_settings.php';
    $system_name = get_setting($pdo, 'system_name', 'স্কুল ম্যানেজমেন্ট সিস্টেম');
    echo "<p>Current system name: " . htmlspecialchars($system_name) . "</p>";
    
} catch (Exception $e) {
    echo "<p style='color: red;'>❌ Error: " . $e->getMessage() . "</p>";
}

echo "<p><a href='customize_school_name.php' style='color: blue; text-decoration: underline;'>Go to Customize School Name Page</a></p>";
echo "<p><a href='student_dashboard.php' style='color: blue; text-decoration: underline;'>Go to Student Dashboard</a></p>";
?>