<?php
include 'config.php';

$stmt = $conn->prepare('SELECT id, name, email, phone, is_email_verified FROM users WHERE email = ? ORDER BY id DESC LIMIT 1');
$email = 'test@example.com';
$stmt->bind_param('s', $email);
$stmt->execute();
$result = $stmt->get_result();
if ($row = $result->fetch_assoc()) {
    echo "User Found:\n";
    echo 'ID: ' . $row['id'] . "\n";
    echo 'Name: ' . $row['name'] . "\n";
    echo 'Email: ' . $row['email'] . "\n";
    echo 'Phone: ' . $row['phone'] . "\n";
    echo 'Email Verified: ' . $row['is_email_verified'] . "\n";
} else {
    echo "User not found\n";
}
$stmt->close();
?>
