Yazamadım hocam
<?php
include("../config.php");

if (isset($_POST['title'])) {

    //collect data
    $error      = null;
    $title      = $_POST['title'];
      $tc_no      = $_POST['tc_no'];
      $telefon      = $_POST['telefon'];
      $total      = $_POST['total'];
            $borclu      = $_POST['total'] - $_POST['kapora'];
      $kapora      = $_POST['kapora'];
    $start      = $_POST['startDate'];
    $end        = $_POST['endDate'];
    $color      = $_POST['color'];
    $text_color = $_POST['text_color'];

    //validation
    if ($title == '') {
        $error['title'] = 'Title is required';
    }
//yeni

        if ($tc_no == '') {
        $error['tc_no'] = 'TC is required';
    }

        if ($telefon == '') {
        $error['telefon'] = 'Telefon is required';
    }

        if ($total == '') {
        $error['total'] = 'Toplam is required';
    }

        if ($kapora == '') {
        $error['kapora'] = 'Kapora is required';
    }

//yeni    

    if ($start == '') {
        $error['start'] = 'Start date is required';
    }

    if ($end == '') {
        $error['end'] = 'End date is required';
    }

    //if there are no errors, carry on
    if (! isset($error)) {

        //format date
        $start = date('Y-m-d H:i:s', strtotime($start));
        $end = date('Y-m-d H:i:s', strtotime($end));
        
        $data['success'] = true;
        $data['message'] = 'Success!';

        //store
        $insert = [
            'title'       => $title,
            
            'tc_no'       => $tc_no,
            'telefon'     => $telefon,
            'total'       => $total,
            'kapora'      => $kapora,
            'borclu'      => $borclu,
            'start_event' => $start,
            'end_event'   => $end,
            'color'       => $color,
            'text_color'  => $text_color
        ];
        $db->insert('events', $insert);
      
    } else {

        $data['success'] = false;
        $data['errors'] = $error;
    }

    echo json_encode($data);
}