![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/public_html/ |
<?php
require_once 'config/database.php';
$pdo = getDBConnection();
if (!$pdo) {
die("Database connection failed");
}
echo "<h2>Checking User Names in Database</h2>";
// Check the specific user (ID 67)
$stmt = $pdo->prepare("SELECT id, name, email FROM users WHERE id = 67");
$stmt->execute();
$user = $stmt->fetch();
if ($user) {
echo "<h3>User ID 67:</h3>";
echo "<p><strong>ID:</strong> " . $user['id'] . "</p>";
echo "<p><strong>Name:</strong> '" . $user['name'] . "'</p>";
echo "<p><strong>Email:</strong> " . $user['email'] . "</p>";
if (is_numeric($user['name'])) {
echo "<p style='color: red;'><strong>ISSUE FOUND:</strong> The name field contains a number instead of a username!</p>";
}
} else {
echo "<p>User ID 67 not found</p>";
}
// Check a few other users to see the pattern
echo "<h3>Sample of Other Users:</h3>";
$stmt = $pdo->query("SELECT id, name, email FROM users ORDER BY id LIMIT 10");
$users = $stmt->fetchAll();
echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
echo "<tr><th>ID</th><th>Name</th><th>Email</th><th>Issue?</th></tr>";
foreach ($users as $u) {
$issue = is_numeric($u['name']) ? "YES - Number in name" : "No";
$color = is_numeric($u['name']) ? "red" : "green";
echo "<tr>";
echo "<td>" . $u['id'] . "</td>";
echo "<td>'" . $u['name'] . "'</td>";
echo "<td>" . $u['email'] . "</td>";
echo "<td style='color: $color;'>$issue</td>";
echo "</tr>";
}
echo "</table>";
// Check if there's a username field
echo "<h3>Database Structure Check:</h3>";
$stmt = $pdo->query("DESCRIBE users");
$columns = $stmt->fetchAll();
echo "<table border='1' style='border-collapse: collapse; width: 100%;'>";
echo "<tr><th>Field</th><th>Type</th><th>Null</th><th>Key</th><th>Default</th><th>Extra</th></tr>";
foreach ($columns as $col) {
echo "<tr>";
echo "<td>" . $col['Field'] . "</td>";
echo "<td>" . $col['Type'] . "</td>";
echo "<td>" . $col['Null'] . "</td>";
echo "<td>" . $col['Key'] . "</td>";
echo "<td>" . $col['Default'] . "</td>";
echo "<td>" . $col['Extra'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>