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

  require 'database.php';
  // code...
  $date = 
  $sql = "INSERT INTO records (Person_ID, recordDate, recordFile)
            VALUES ('" . mysqli_escape_string($conn, $_POST['GuestID']) . "', '"
                        . mysqli_escape_string($conn, $_POST['date']) . "','"
                        . mysqli_escape_string($conn, $_POST['writerecord']) . "')";

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

  if ($results === false) {
    echo mysqli_error($conn);
  } else {

    $id = mysqli_insert_id($conn);
    echo "records has been entered with this id $id";
  }


}

 ?>
 <button onClick="history.back()">Go Back</button>