PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Feb 15, 2005 5:02 pm
here is my code, i have tracked it down to somthing wrong with this. The problem is that the table is like 7 lines down from the top of the page and i can not figure out why. can anyone figure out why the table shows so far down on the page?
Code: Select all
<table id="forums">
<tr><th colspan="10">Memeber List</th></tr>
<tr><th>Username</th><th>Email Address</th><th>Title</th><th>Join Date</th><th>Validated</th><th>Access Level</th><th>Posts</th></tr>
';
$query = mysql_query("SELECT * FROM users ORDER BY uid DESC");
while ($info = mysql_fetch_assoc($query)){
$access_level = $infoї'access_level'];
$validate = $infoї'validate'];
echo '<br />';
echo '<tr><td><a href="profile.php?user='.$infoї'username'].'">'.$infoї'username'].'</a></td><td>';
if (isset($_SESSIONї'username'])){
if ($infoї'show_email'] == '1'){
echo "<a href='mailto:".$infoї'email']."'><img src='img/email.gif'></a>";
}elseif($infoї'show_email'] == '0'){
echo 'User wishes to not show their e-mail';
}
}elseif(!isset($_SESSIONї'username'])){
echo 'You must be logged in to send users E-mails';
}
echo'</td><td>'.$infoї'title'].'</td><td>'.$infoї'joindate'].'</td><td>';
echo($infoї'validate'] == 1 ? 'Yes' : 'No');
echo '</td><td>';
if ($validate == "0"){
echo 'awaiting validation';
}elseif ($access_level == "0"){
echo 'banned';
}elseif ($access_level == "1"){
echo 'member';
}elseif ($access_level == "2"){
echo 'admin';
}elseif ($access_level == "3"){
echo 'master';
}elseif ($access_level == "4"){
echo 'owner';
}
echo '</td>';
echo '<td>'.$infoї'postcount'].'</td>';
echo '</tr>';
}
echo '</table>';
ps i use <table id='forums'> many times and this is the only occurence of it so i dont think it has to do with the css.
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Feb 15, 2005 5:05 pm
the table at the beginning of the code? it's something before that... very likely.
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Feb 15, 2005 5:47 pm
it is not somthing before because i have tried using just that bit of code and the table still starts lines down so it is definatly something in that section of code
feyd
Neighborhood Spidermoddy
Posts: 31559 Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA
Post
by feyd » Tue Feb 15, 2005 5:52 pm
guess you didn't notice the '<br />' being printed outside a table row..
shiznatix
DevNet Master
Posts: 2745 Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:
Post
by shiznatix » Tue Feb 15, 2005 5:56 pm
...wow, suicide is my only option after that one