random spaces

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

Post Reply
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

random spaces

Post by shiznatix »

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))&#123;
	$access_level = $info&#1111;'access_level'];
	$validate = $info&#1111;'validate'];
		
		echo '<br />';
		echo '<tr><td><a href="profile.php?user='.$info&#1111;'username'].'">'.$info&#1111;'username'].'</a></td><td>';
		if (isset($_SESSION&#1111;'username']))&#123;
			if ($info&#1111;'show_email'] == '1')&#123;
			echo "<a href='mailto:".$info&#1111;'email']."'><img src='img/email.gif'></a>";
			&#125;elseif($info&#1111;'show_email'] == '0')&#123;
			echo 'User wishes to not show their e-mail';
			&#125;
		&#125;elseif(!isset($_SESSION&#1111;'username']))&#123;
		echo 'You must be logged in to send users E-mails';
		&#125;
		echo'</td><td>'.$info&#1111;'title'].'</td><td>'.$info&#1111;'joindate'].'</td><td>';
		echo($info&#1111;'validate'] == 1 ? 'Yes' : 'No');
		echo '</td><td>';
	
		if ($validate == "0")&#123;
		echo 'awaiting validation';
		&#125;elseif ($access_level == "0")&#123;
		echo 'banned';
		&#125;elseif ($access_level == "1")&#123;
		echo 'member';
		&#125;elseif ($access_level == "2")&#123;
		echo 'admin';
		&#125;elseif ($access_level == "3")&#123;
		echo 'master';
		&#125;elseif ($access_level == "4")&#123;
		echo 'owner';
		&#125;
		echo '</td>';
		echo '<td>'.$info&#1111;'postcount'].'</td>';
		echo '</tr>';
		
	&#125;
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.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

the table at the beginning of the code? it's something before that... very likely.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

guess you didn't notice the '<br />' being printed outside a table row..
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

...wow, suicide is my only option after that one
Post Reply