<?php
require 'header.php';
 require 'dbconnect.php';
 include 'functions.php';

// $data = $_POST['body'];
// var_dump($data);

$data = json_decode(file_get_contents("php://input",true));
var_dump($data);


// echo $_POST->title;


 $title = trim($data->title);
 $startDate = trim($data->start);
 $endDate = trim($data->end);

 $field= array('eventTitle','dtDateStart','dtDateEnd','time','eventDescription');
    $data=array($title,$startDate,$endDate,"","");

// echo $title;


Insertdata('event',$field,$data)





?>