darkfreaks Posted February 8, 2008 Share Posted February 8, 2008 i cannot figure out why it isnt showing i think it has something to do with the loop being in it but would not know were to start looking. Code: <?php $strTitle = "Complaints/Reports"; define('QUADODO_IN_SYSTEM', true); require_once 'includes/header2.php'; $qls->Security->check_auth_page('complaints.php'); echo "<h2>Complaints/Reports</h2>"; include 'config.php'; $query=trim(mysql_real_escape_string($query)); $query = "SELECT * FROM vc_comments WHERE username='admin' ORDER BY `id` DESC LIMIT 0,9"; $result = mysql_query($query); $num=mysql_num_rows($result) or die(mysql_error()); mysql_close(); $i=0; while ($i<$num) { $logname = stripslashes($qls->user_info['username']); $id = mysql_result($result,$i,"id"); $from = mysql_result($result,$i,"fname"); $date = mysql_result($result,$i,"date"); $message = mysql_result($result,$i,"message"); if($logname==""){ echo "You Must Be Logged in to leave a comment";} else{ echo" <form name=action id=action method=post action=commentsdelete.php> <table border=0 width=100% cellpadding=0 cellspacing=0 class=table> <tr> <td><input type=checkbox id=$id value=$id name=$id></td> <td align=center> <a href=../profile/$from>$from</a><br>$date<br> <a href=commentsadd.php?u=$from>[ Reply ]</a> </td> <td> $message </td></tr></table> <p> <input type=submit name=delete id=delete value=Delete Comments></form>";?> <? } $i++; } include ('includes/footer.php'); ?> Quote Link to comment Share on other sites More sharing options...
mem0ri Posted February 8, 2008 Share Posted February 8, 2008 Get rid of the ?> at the end of your form (on the </form> line) and the <? immediately following. It's possibily your PHP.ini file isn't setup to handle 'short php tags' and that's messing thigns up--plus, you don't need to end PHP code and start PHP code again right in the middle of PHP code. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted February 8, 2008 Author Share Posted February 8, 2008 still not workingg anyone else ??? Quote Link to comment Share on other sites More sharing options...
KrisNz Posted February 8, 2008 Share Posted February 8, 2008 what does $num = ? what value does $logname have? Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted February 8, 2008 Author Share Posted February 8, 2008 someone cant read code or is just ignorant Quote Link to comment Share on other sites More sharing options...
haku Posted February 8, 2008 Share Posted February 8, 2008 Try taking the 'name' attribute out of your form name, as it is depracated. I really doubt that is your problem, but since everything else looks ok, then who knows, maybe that's screwing you up. Quote Link to comment Share on other sites More sharing options...
KrisNz Posted February 8, 2008 Share Posted February 8, 2008 You do realize, that $logname = stripslashes($qls->user_info['username']); doesn't actually tell me what value it has. It could be nothing for all I know. $num could equal 0. I'm suggesting that you check those values to see if they're what you expect. Plus posting code that poorly written and laid out and then saying I can't read code is pretty funny. Quote Link to comment Share on other sites More sharing options...
darkfreaks Posted February 8, 2008 Author Share Posted February 8, 2008 ok this topic is solved no one is being much help 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.