<?php

 	session_start(); 

	include("connect.php");

	if(!isset($_SESSION['tulsilogin']))

	{

		header('Location: index.php');

		return;

	}



	date_default_timezone_set("Asia/Kolkata");

	$mdate1= date('Y-m-d H:i:s');

	$mdate2= date('Y-m-d');



	

	$imid=$_POST['imid1'];

	

	$icdmsg=$_POST['icdmsg'];

	$icdaddedby=$_SESSION['umid'];

	

	

	 $eve1 = "INSERT INTO res_internalchat_detail (icdmsg,icaddedon,imid,icdaddedby) VALUES('$icdmsg','$mdate1',$imid,$icdaddedby)";

	 $re1 = mysqli_query($conn, $eve1);

		

	

	

	

	
if($_SESSION['frompage']=='aplicationInquirydetailpage')
			{
				$stiqmid = $_POST['stiqmid'];
				header("Location: applicationinquirydetail.php?id=$stiqmid&chat1=yes");
			}else{
	header("Location: inquirydetail.php?id=$imid&chat1=yes");
			}
	

	

	

?>