i have this code to do simple comment on the listings on my site
require_once($config['basepath'].'/include/listing.inc.php');
require_once($config['basepath'].'/include/misc.inc.php');
$misc = new misc();
$listingID = $_GET['listingID'];
$sql = "SELECT * FROM default_en_comments WHERE listingID = '$listingID'";
$recordSet = $conn->Execute($sql);
if ($recordSet === false) {
$misc->log_error($sql);
}
while (!$recordSet->EOF) {
$comments = $misc->make_db_unsafe ($recordSet->fields[comment]);
$name = $misc->make_db_unsafe ($recordSet->fields[name]);
$display .= '<li>' .$comments. ' By ' .$name. '</li>';
$recordSet->MoveNext();
}
return $display;
}
but the problem with this is, if someone posts comment on my listing i don't have an option to delete that comment if it is not proper coment, who ever owns that lisitng i want them to be able to delete unnecessary comments.
also if the comment is empty and some body submit an empty message it still posts. can that be stopped
or anywher i can get something like this if exist?
thank you