Jump to content

[SOLVED] form does not show?


darkfreaks

Recommended Posts

ok so i have a compaint form and iti snot showing up any ideas ???

 

 

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>
<form name=\"action\" id=\"action\" method=\"post\" action=\"commentsdelete.php\">
";

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) {

$id = mysql_result($result,$i,"id");
$from = mysql_result($result,$i,"fname");
$date = mysql_result($result,$i,"date");
$message = mysql_result($result,$i,"message");
{
echo "<table border=\"0\" width=\"100%\" cellpadding=\0\" cellspacing=\"0\" class=\"table\">
<tr>
<td width=\"20\"><input type=\"checkbox\" id=\"$id\" value=\"$id\" name=\"$id\"></td>
<td width=\"30%\" align=\"center\">
<a href=\"../profile/$from\">$from</a><br>$date<br>
<a href=\"commentsadd.php?u=$from\">[ Reply ]</a>
</td>
<td width=\"70%\">
$message
</td></tr></table>
<p>";
};

$i++;
}

echo "<input type=\"submit\" name=\"delete\" id=\"delete\" value=\"Delete Comments\">
</form>";

include ('includes/footer.php');
?>

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/89652-solved-form-does-not-show/
Share on other sites

<?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>
<form name=\"action\" id=\"action\" method=\"post\" action=\"commentsdelete.php\">
";

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) {

$id = mysql_result($result,$i,"id");
$from = mysql_result($result,$i,"fname");
$date = mysql_result($result,$i,"date");
$message = mysql_result($result,$i,"message");
{///////<-----------------------------------------------------------------------------------what is that
echo "<table border=\"0\" width=\"100%\" cellpadding=\0\" cellspacing=\"0\" class=\"table\">
<tr>
<td width=\"20\"><input type=\"checkbox\" id=\"$id\" value=\"$id\" name=\"$id\"></td>
<td width=\"30%\" align=\"center\">
<a href=\"../profile/$from\">$from</a><br>$date<br>
<a href=\"commentsadd.php?u=$from\">[ Reply ]</a>
</td>
<td width=\"70%\">
$message
</td></tr></table>
<p>";
};//----------------------------------------------------------------what is this?

$i++;
}

echo "<input type=\"submit\" name=\"delete\" id=\"delete\" value=\"Delete Comments\">
</form>";

include ('includes/footer.php');
?>

see the comments

<?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><form name="action" id="action" method="post" action="/commentsdelete.php">';

include 'config.php';

$total_a = mysql_query("SELECT Count(*) AS Count FROM `vc_comments` WHERE `username` = 'admin'");
$total_b = mysql_result($total_a, 0, 0);

if(!empty($total_b))
{
$a = mysql_query("SELECT * FROM `vc_comments` WHERE `username` = 'admin' ORDER BY `id` DESC LIMIT 0,9");
while($b = mysql_fetch_assoc($a))
{
echo '<table border="0" width="100%" cellpadding="0" cellspacing="0" class="table">
<tr>
<td width="20"><input type="checkbox" id="'.$b['id'].'" value="'.$b['id'].'" name="id[]"></td>
<td width="30%" align="center">
<a href="../profile/'.$b['fname'].'">'.$b['fname'].'</a><br>'.$b['date'].'<br>
<a href="/commentsadd.php?u='.$b['fname'].'">[ Reply ]</a>
</td>
<td width="70%">'.$b['message'].'</td>
</tr>
</table>';
}
}

echo '<input type="submit" name="delete" id="delete" value="Delete Comments"></form>';

include 'includes/footer.php';
?>

 

thats how id do it..

<?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>
<form name=\"action\" id=\"action\" method=\"post\" action=\"commentsdelete.php\">
";

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

if(mysql_num_rows($result)>0){
echo "<table border=\"0\" width=\"100%\" cellpadding=\0\" cellspacing=\"0\" class=\"table\">
<tr>";

while($row = mysql_fetch_array($result)){
	$id =$row["id"];
	$from = $row["fname"];
	$date = $row["date"];
	$message = $row["message"];
	echo "<td width=\"20\"><input type=\"checkbox\" id=\"$id\" value=\"$id\" name=\"$id\"></td>
	<td width=\"30%\" align=\"center\">
	<a href=\"../profile/$from\">$from</a><br>$date<br>
	<a href=\"commentsadd.php?u=$from\">[ Reply ]</a>
	</td>
	<td width=\"70%\">
	$message
	</td></tr>";
                  echo "</table>";
}
}
echo "<p><input type=\"submit\" name=\"delete\" id=\"delete\" value=\"Delete Comments\"></form>";

include ('includes/footer.php');
?>

try

<?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>
<form name=\"action\" id=\"action\" method=\"post\" action=\"commentsdelete.php\">
";

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) {

$id = mysql_result($result,$i,"id");
$from = mysql_result($result,$i,"fname");
$date = mysql_result($result,$i,"date");
$message = mysql_result($result,$i,"message");

echo "<table border=\"0\" width=\"100%\" cellpadding=\0\" cellspacing=\"0\" class=\"table\">
<tr>
<td width=\"20\"><input type=\"checkbox\" id=\"$id\" value=\"$id\" name=\"$id\"></td>
<td width=\"30%\" align=\"center\">
<a href=\"../profile/$from\">$from</a><br>$date<br>
<a href=\"commentsadd.php?u=$from\">[ Reply ]</a>
</td>
<td width=\"70%\">
$message
</td></tr></table>
<p>";

$i++;
}

echo "<input type=\"submit\" name=\"delete\" id=\"delete\" value=\"Delete Comments\">
</form>";

include ('includes/footer.php');
?>

 

that is NOT workin?

I think your problem may be here:

 

echo '<h2>Complaints/Reports</h2><form name="action" id="action" method="post" action="/commentsdelete.php">';

 

you are missing backslashes before mosto f your quotes. It should read:

 

echo '<h2>Complaints/Reports</h2><form name=\"action\" id=\"action\" method=\"post\" action=\"/commentsdelete.php\">';

Archived

This topic is now archived and is closed to further replies.

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