Jump to content
MakeWebGames

Recommended Posts

Posted (edited)

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
Posted
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%'>";
Posted
Turn you error reporting on too. You can set it up for your ip, userid, or userlevel for a production environment to be a bit safer. That may help debug a bit for you while you are live

I did, however after moving servers. The errors always came out as a white blank page?

Posted
I did, however after moving servers. The errors always came out as a white blank page?

Check your php configuration - or override it with a custom php.ini file in your game directory.

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...