Your IP : 216.73.217.20


Current Path : /home/u438053920/domains/allindiacomputereducation.com/public_html/
Upload File :
Current File : /home/u438053920/domains/allindiacomputereducation.com/public_html/comments.php

<?php
ob_start();
include_once("connection.php");
if(!empty($_POST["name"]) && !empty($_POST["comment"]) && !empty($_POST["blog_id"]))
{
	$insertComments = "INSERT INTO `comment`(`parent_id`, `comment`, `sender_name`, `email`, `website`, `blog_id`) VALUES ('".$_POST["commentId"]."','".$_POST["comment"]."','".$_POST["name"]."','".$_POST["email"]."','".$_POST["website"]."','".$_POST["blog_id"]."')";
	mysqli_query($conn, $insertComments) or die("database error: ". mysqli_error($conn));	
	$message = '<label class="text-success">Comment posted Successfully.</label>';
	$status = array(
		'error'  => 0,
		'message' => $message
	);	
} else {
	$message = '<label class="text-danger">Error: Comment not posted.</label>';
	$status = array(
		'error'  => 1,
		'message' => $message
	);	
}
echo json_encode($status);
?>