Jump to content

[SOLVED] form not showing?


darkfreaks

Recommended Posts

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');
?>

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.