D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
shubmkcj
/
urbane.createerp.com
/
ajax
/
Filename :
add-profaramId-comments.php
back
Copy
<?php ini_set('display_errors',0); error_reporting(0); ob_start(); session_start(); include_once("../config.php"); date_default_timezone_set( "Asia/Calcutta" ); $regDate = date( 'd-M-Y H:i' ); if (isset($_SESSION["login_email"]) && $_SESSION["login_email"] != "") { $loginedUserId = $_SESSION["login_email"]; } if (isset($_POST['txtcomment']) && $_POST['txtcomment'] != "") { $prcomment = filter_var( $_POST['txtcomment'], FILTER_SANITIZE_STRING ); } if (isset($_POST['pr_Id']) && $_POST['pr_Id'] != "") { $profaramId = filter_var( $_POST['pr_Id'], FILTER_SANITIZE_STRING ); } if (!empty( $profaramId)){ $querycomment = "INSERT INTO `chat_proforma`(`proformaId`, `userId`, `comment`,`date`, `status`) VALUES ('$profaramId', '$loginedUserId', '$prcomment','$regDate', 'active')"; if ( mysqli_query( $conn, $querycomment ) ) { $msg['status'] = "true"; $msg['msg'] = "Thank you for Commenting on ".$profaramId; echo json_encode( $msg ); exit(); }else{ $msg['status'] = "false"; $msg['msg'] = "error, please try again"; echo json_encode( $msg ); exit(); } }else{ $msg['status'] = "false"; $msg['msg'] = "Profaram Id Is Empty"; echo json_encode( $msg ); exit(); } ?>