unidox Posted November 18, 2007 Share Posted November 18, 2007 I am having a problem. Here is the code: admin.php: <div id="users"> <? include("" . $site_url . "incs/files.inc.php?p=admin_users"); ?> </div> files.inc.php: $admins = MYSQL_QUERY("SELECT * FROM `pcp_users` WHERE level = 1"); $staff = MYSQL_QUERY("SELECT * FROM `pcp_users` WHERE level = 2"); $users = MYSQL_QUERY("SELECT * FROM `pcp_users` WHERE level = 3"); $validated = MYSQL_QUERY("SELECT * FROM `pcp_users` WHERE conf = 1"); $notvalid = MYSQL_QUERY("SELECT * FROM `pcp_users` WHERE conf = 0"); echo "<table width='100%'>"; echo "<tr><td colspan='4'>Admins:<br /></td></tr>"; echo "<tr><td width='30%'><b>Username</b></td><td width='30%'><b>Name</b></td><td width='30%'><b>Email</b></td><td width='10%'>Edit/Delete</td></tr>"; while($admins2 = mysql_fetch_array($admins)) { echo "<tr><td width='30%'>" . $admins2['username'] . "</td><td width='30%'>" . $admins2['name'] . "</td><td width='30%'>" . $admins2['email'] . "</td><td width='10%'>.</td></tr><br />"; } echo "</table>"; Output html: <div style="margin: 0px;" id="users"> <br><br><br><br><br><br><br><br><br><table width="100%"><tbody><tr><td colspan="4">Admins:<br></td></tr><tr><td width="30%"><b>Username</b></td><td width="30%"><b>Name</b></td><td width="30%"><b>Email</b></td><td width="10%">Edit/Delete</td></tr><tr><td width="30%">... Why is it adding all those <br>'s? Quote Link to comment Share on other sites More sharing options...
trq Posted November 18, 2007 Share Posted November 18, 2007 A better question is, why are you querying the same table in your database 5 times in a row? Rediculous! As for your output, I don't see where that is related to the code you posted. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.