I read through the pinned forums at the top, but just had to ask. I am very OCD about things, and wanted to ask if anything was wrong with this bit of code, technique wise.
I love to code and can usually make something work, but it turns out to be horrible looking -code wise- and if anything, that is what makes it so hard for me to program.
I added a snippet and would like to ask, “what are some tips that could make this more visually appealing?”
<?php
function users() {
$page = <<<END
<h3>Users</h3>
<p>Click a username to edit the account.</p>
<table id="info">\
END;
$query = doquery("SELECT id, username, email, authlevel " .
"FROM {{table}} " .
"ORDER BY id", "users");
$count = 1;
while ($row = mysql_fetch_array($query)) {
if ($count == 1) {
$page .= "<tr class=\\"alt\\"><td>".$row["username"]."</td><td>".$row["email"]."</td><td class=\\"id\\">".$row["authlevel"]."</td></tr>\
";
$count = 2;
} else {
$page .= "<tr><td>".$row["username"]."</td><td>".$row["email"]."</td><td class=\\"id\\">".$row["authlevel"]."</td></tr>\
";
$count = 1;
}
}
if (mysql_num_rows($query) == 0) {
$page .= "<tr class=\\"alt\\"><td>No users found.</td></tr>\
";
}
$page .= "</table>";
admindisplay($page, "Users");
}
?>