Jump to content
MakeWebGames

Viewuser Error


Recommended Posts

For some reason no errors show on my game?

It just comes out blank...So I don't really know the error however the code I have looks fine?

 

echo "<table width='90%' cellspacing='1' class='table'><tr style='background:grey'>
<th colspan='3'>Users Comments <a href='comments.php?ID={$r['userid']}'>[Add Comment]</a></th>";
if($ir['user_level'] == 2 || $ir['user_level == 3)
{
echo "<th width='10%'>Delete</th>";
}
if($ir['userid'] == $r['userid'])
{
echo "<th width='10%'>Block</th>";
}
echo "</tr>";

$query = $db->query("SELECT `cmtTIME`,`cmtTO`,`cmtFROM`,`cmtTEXT` FROM `comments` WHERE `cmtTO` = {$r['userid']} ORDER BY `cmtTIME` DESC LIMIT 5");
while($q=$db->fetch_row($query))
{
$they = $db->query("SELECT `username`,`userid` FROM `users` WHERE `userid` = {$q['cmtFROM']}");
$them = $db->fetch_row($they);
$sent = date('F j, Y, g:i:s a',$q['cmtTIME']);

if($them['display_pic'])
{
echo "<td width='50'><img src='{$them['display_pic']}' width='50' height='50' alt='User Display Pic' title='User Display Pic' /></td>";
}
else
{
echo "<td width='50'><img src='images/default.jpg' width='50' height='50' alt='User Display Pic' title='User Display Pic' /></td>";
}
}
echo "<td><a href='viewuser.php?u={$them['userid']}'>{$them['username']} [{$them['userid']}]</a></br></br>$sent</td>
<td>{$q['cmtTEXT']}</td>";

if($ir['user_level'] == 2 || $ir['user_level'] == 3)
{
echo "<td width='10%'><a href='comments.php?action=delete&ID={$q['cmtID']}'>Delete</a></td>";
}
if($ir['userid'] == $r['userid'])
{
echo "<td width='10%'><a href='comments_block.php?action=add&ID={$them['userid']}'>Block</a></td>";
}
echo "</tr>";
}
echo "</table><hr width='90%'>";

 

Can anyone help me?

Edited by Samurai Legend
Link to comment
Share on other sites

if($ir['user_level'] == 2 || $ir['user_level == 3)

 

is the error

and you also have a extra curly bracket

Pastebin: http://pastebin.com/U4XSxJAg

 

echo "
<table width='90%' cellspacing='1' class='table'>
<tr style='background:grey'>
	<th colspan='3'>Users Comments <a href='comments.php?ID={$r['userid']}'>[Add Comment]</a></th>";
	if($ir['user_level'] == 2 || $ir['user_level'] == 3) {
		echo "<th width='10%'>Delete</th>";
	}
	if($ir['userid'] == $r['userid']) {
		echo "<th width='10%'>Block</th>";
	}
	echo "</tr>";
	$query = $db->query("SELECT `cmtTIME`,`cmtTO`,`cmtFROM`,`cmtTEXT` FROM `comments` 
	WHERE `cmtTO` = {$r['userid']} ORDER BY `cmtTIME` DESC LIMIT 5");
	while($q=$db->fetch_row($query)) {
		$they = $db->query("SELECT `username`,`userid` FROM `users` WHERE `userid` = {$q['cmtFROM']}");
		$them = $db->fetch_row($they);
		$sent = date('F j, Y, g:i:s a',$q['cmtTIME']);  
		if($them['display_pic']) {
			echo "
			<td width='50'>
				<img src='{$them['display_pic']}' width='50' 
				height='50' alt='User Display Pic' title='User Display Pic' />
			</td>";
		}
		else {
			echo "
			<td width='50'>
				<img src='images/default.jpg' width='50' height='50' 
				alt='User Display Pic' title='User Display Pic' />
			</td>";
		}
	}
	echo "
	<td><a href='viewuser.php?u={$them['userid']}'>{$them['username']} [{$them['userid']}]</a></br></br>$sent</td>
	<td>{$q['cmtTEXT']}</td>";
	if($ir['user_level'] == 2 || $ir['user_level'] == 3) {
		echo "
		<td width='10%'><a href='comments.php?action=delete&ID={$q['cmtID']}'>Delete</a></td>";
	}
	if($ir['userid'] == $r['userid']) {
		echo "
		<td width='10%'><a href='comments_block.php?action=add&ID={$them['userid']}'>Block</a></td>";
	}
	echo "</tr>";
echo "</table><hr width='90%'>";
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...