به نظر من استفاده از bindParam کد اضافی زدنه به این صورت هم میشه نوشت:
<?php if(isset($_POST["save"]))
{
$author = Prevent($_POST["author"]);
$email = Prevent($_POST["email"]);
$comment = Prevent($_POST["comment"]);
$param=array($author,$email,$comment) ;
$sql = "INSERT `$tbl_comments SET `name`=?,`email`=?,`comment`=?";
$result_r = $connect->prepare($sql);
if($result_r->execute($param))
{
echo "<script>alert('success');
</script>";
} else {
echo "<script>alert('wrong');
</script>";
} } ?>