<?php
    session_start();
    ob_start();
    require_once("config/conexao.class.php");
    require_once("config/crud.class.php");
	
    $con = new conexao(); 
    $con->connect(); 
    
    $msg = utf8_decode($_POST['msg']);
    $date = date('Y-m-d H:i:s');
    $user = $_SESSION['admid'];
    $customer = $_GET['customer'];
    
    $crud = new crud('chat');  // table
    $crud->inserir("customer,user,sessao,date,msg,tp,status", "'$customer','$user','$sessao','$date','$msg','2','S'");
    
    
    ?>
    
