<?php
  if ($_SERVER["REQUEST_METHOD"] == "POST") {

    require '../includes/db.php';

    $current_date = date("Y-m-d");
    // code...
    $sql = "INSERT INTO childrencheckin (CheckingName, CheckingDate, CheckingIn)
              VALUES ('" . mysqli_escape_string($con, $_POST['CheckingName']) . "', '"
                          . mysqli_escape_string($con, $_POST['CheckingDate']) . "','"
                          . mysqli_escape_string($con, $_POST['CheckingIn']) . "')";

    $results = mysqli_query($con, $sql);

    if ($results === false) {
      echo mysqli_error($con);
      $_POST['CheckingName'];
    } else {

      $id = mysqli_insert_id($con);
       echo "Successfully check IN";
    }


  }

   ?>