<?php
// Simple test file to check if PHP is working
echo "PHP is working!<br>";

// Test database connection
require('include/dbconfig.php');

if ($connection) {
    echo "Database connection successful!<br>";
    
    // Check if new columns exist
    $query = "SHOW COLUMNS FROM account LIKE 'ibf'";
    $result = mysqli_query($connection, $query);
    if (mysqli_num_rows($result) > 0) {
        echo "IBF column exists!<br>";
    } else {
        echo "IBF column does NOT exist - Please run SQL script!<br>";
    }
    
    $query = "SHOW COLUMNS FROM account LIKE 'erm'";
    $result = mysqli_query($connection, $query);
    if (mysqli_num_rows($result) > 0) {
        echo "ERM column exists!<br>";
    } else {
        echo "ERM column does NOT exist - Please run SQL script!<br>";
    }
    
    $query = "SHOW COLUMNS FROM account LIKE 'login_attempts'";
    $result = mysqli_query($connection, $query);
    if (mysqli_num_rows($result) > 0) {
        echo "login_attempts column exists!<br>";
    } else {
        echo "login_attempts column does NOT exist - Please run SQL script!<br>";
    }
    
} else {
    echo "Database connection FAILED!<br>";
    echo "Error: " . mysqli_connect_error();
}
?>
