����JFIF��`�`�����Viewing File: /home/u820193700/domains/spiti2026im.in/public_html/api/check_db.php
<?php
// api/check_db.php
// Visit this file in your browser to test your database connection.
// Example: https://spiti2026im.in/api/check_db.php

error_reporting(E_ALL);
ini_set('display_errors', 1);

require_once 'db_connect.php';

echo "<h1>Spiti 2026 Database Connection Test</h1>";

try {
    $stmt = $pdo->query("SELECT COUNT(*) FROM admins");
    $count = $stmt->fetchColumn();
    echo "<p style='color:green; font-weight:bold;'>SUCCESS: Database connection is working perfectly!</p>";
    echo "<p>Admin accounts found: " . $count . "</p>";
} catch (Exception $e) {
    echo "<p style='color:red; font-weight:bold;'>FAILURE: Could not communicate with the database.</p>";
    echo "<pre>" . $e->getMessage() . "</pre>";
    echo "<p>Check your <b>api/db_connect.php</b> file and verify your Hostinger DB credentials.</p>";
}
Back to Directory �������}�!1AQa"q2���#B��R��$3br� %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz�������������������������������������������������������������������������������� ������w�!1AQaq"2�B���� #3R�br� $4�%�&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz������������������������������������������������������������������������ ��?��_��+��?��(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(���(�����