<?php
include 'config.php';

// Check latest pending registration
$stmt = $conn->prepare("SELECT id, email, otp_code, is_verified, created_at FROM pending_registrations ORDER BY created_at DESC LIMIT 1");
$stmt->execute();
$result = $stmt->get_result();

if ($row = $result->fetch_assoc()) {
    echo "Latest Pending Registration:\n";
    echo "Email: " . $row['email'] . "\n";
    echo "OTP: " . $row['otp_code'] . "\n";
    echo "Verified: " . $row['is_verified'] . "\n";
    echo "Created: " . $row['created_at'] . "\n";
} else {
    echo "No pending registrations found\n";
}
$stmt->close();
?>
