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

    require 'database.php';

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

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

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

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


  }

   ?>