View file iblog/themes/stock/validation/comments_ajax.php
<?php
include "../../../lib/config.php";
if($_POST['comments'] == ''){
echo "Please Enter comments";
}
else if($_POST['name'] == ''){
echo "Please Enter Your Name";
}
else if($_POST['email'] == ''){
echo "Please Enter Your Email";
}
else{
$conn->query("INSERT INTO comments(blog_id, name, email, mobile, comments)
VALUES ('{$_POST['blogid']}','{$_POST['name']}','{$_POST['email']}','{$_POST['mobile']}','{$_POST['comments']}')");
echo 1;
}
?>