Trojan's Trophy Room
setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) { // failed connection
echo "SQL connection failed: " . $e->getMessage();
}
// Check if the admin table exists
$sqlCheckAdminTable = $conn->prepare("SHOW TABLES LIKE '" . $adminUserTableName . "'");
// Run the query
$sqlCheckAdminTable->execute();
//Check if any rows exist
$count = $sqlCheckAdminTable->rowCount();
$count = 1;
// EVENTUALLY WE NEED TO MAKE SURE THE PERSON LOGGED IN IS AN ADMIN
if ($count == 0) { // If no safe admins are found, we'll force creation of one
echo "
";
} else { // Otherwise we'll show the nav page
echo "
";
}
?>