throws the error "array (4)"

When trying to send data to the database, it gives an error: "array (4) {[" dateCL "] => string (10)" 2021-11-25 "[" timeCL "] => string (5)" 01:09 "[ "name"] => NULL ["tel"] => line (7) "8465489"} ". At the same time, data does not come to the database.

Code from index.php

        <div class="record text-center mx-auto">
                <p><input type="date" name="dateCL" id="dateCL" placeholder="ДАТА" class="text-center dateCL"></p>
                <p><input type="time" name="timeCL" id="timeCL" placeholder="ВРЕМЯ" class="text-center timeCL"></p>
                <p><input type="text" name="name" id="name" placeholder="ВАШЕ ИМЯ" class="text-center name"></p>
                <p><input type="tel" name="tel" id="tel" placeholder="НОМЕР ТЕЛЕФОНА" class="text-center tel"></p>
                <p><button type="submit" class="submit">ЗАПИСАТСЯ</button></p>
        </div>
    </div>
</div>
<script>
  $(document).ready(function(){
    $('button.submit').on('click', function(){
      var dateCL = $('input.dateCL').val();
      var timeCL = $('input.timeCL').val();
      var name = $('input.name').val();
      var tel = $('input.tel').val();
      $.ajax({
        method: "POST",
        url: "component/send.php",
        data: { dateCL: dateCL, timeCL: timeCL, name: name, tel: tel }
      })
        .done(function( msg ) {
          alert( "Data Saved: " + msg );
        });
    })
  })
</script>

Ответы (0 шт):