<?php
require("../../config/koneksi.php");
require("../../config/function.php");
require("../../config/crud.php");

$pesan = $_POST['pesan'];
$dari = $_POST['dari'];
$untuk = $_POST['untuk'];
$id = $_POST['id'];

mysqli_query($koneksi,"UPDATE chating SET status='1' where id='$id' ");

$datax=[
  'dari' => $dari,
  'untuk' => $untuk,
  'isi' => $pesan,
  'waktu' =>$datetime
   ];
   insert($koneksi, 'chating', $datax);
   echo "ok";
   
   ?>
   
   

