blog owner can delete blog comments

Started on the old forum in May 2010 · view the original in the archive · old links redirect here

2 replies · 614 views · started 16 years ago · 1 min read

3 participants
dominik92r Junior · 38 posts #1

welcome. i need code - delete comments by blog owner. you can convert it? please

$id = cleanQuery($_GET["id"]);

echo "<head>"; echo "<title>Delete Comment</title>"; echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">"; echo "</head>"; echo "<body>";

echo " ";

$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."'"); if($res) { mysql_query("INSERT INTO ibwf_mlog SET action='Blogcomment', details='".getnick_uid(getuid_sid($sid))." Deleted a Blog Comment', actdt='".time()."'"); echo "<img src="../images/ok.gif" alt="O"/>Comment deleted"; }else{ echo "<img src="../images/notok.gif" alt="X"/>Database Error"; } echo "

";

echo "<a href="index.php?action=main&sid=$sid"><img src="../images/home.gif" alt="*"/>"; echo "Home</a>"; echo "

</body>";
shad0w Developer · 119 posts #3

Replace

$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."'");

with

$uid=getuid_sid($sid);
$res = mysql_query("DELETE FROM ibwf_blogcomment WHERE id ='".$id."', uid='".$uid."'");

whatmp3.name - search mp3 on mobile

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close