Samurai Legend Posted May 27, 2014 Share Posted May 27, 2014 (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 May 27, 2014 by Samurai Legend Quote Link to comment Share on other sites More sharing options...
wrux Posted May 27, 2014 Share Posted May 27, 2014 indent your code and it might be so much more readable man Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted May 27, 2014 Share Posted May 27, 2014 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%'>"; Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted May 28, 2014 Author Share Posted May 28, 2014 Thanks man! That worked great! Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 28, 2014 Share Posted May 28, 2014 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 Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted May 28, 2014 Author Share Posted May 28, 2014 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? Quote Link to comment Share on other sites More sharing options...
sniko Posted May 28, 2014 Share Posted May 28, 2014 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. Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted May 28, 2014 Author Share Posted May 28, 2014 Check your php configuration - or override it with a custom php.ini file in your game directory. How do I make a custom one? With the requirements I need? Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted May 28, 2014 Share Posted May 28, 2014 if your using free hosting then i don't think you would be able to access your php.ini try create a file called that Quote Link to comment Share on other sites More sharing options...
Samurai Legend Posted May 28, 2014 Author Share Posted May 28, 2014 I got a VPS... Quote Link to comment Share on other sites More sharing options...
KyleMassacre Posted May 28, 2014 Share Posted May 28, 2014 Before messing with your PHP settings take a look at this http://lzone.de/PHP-ini_set-Examples Quote Link to comment Share on other sites More sharing options...
NonStopCoding Posted May 28, 2014 Share Posted May 28, 2014 well if your on vps then you should be all good :) 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.