<?php
include("connection.php");
if (isset($_POST['add'])) {
    $track_number = $_POST['track_number'];
    $currentDateTime = date('Y-m-d H:i:s');
    // Prepare the insert statement
    $sql="INSERT INTO track (track_file,date_time) VALUES ('$track_number','$currentDateTime')";
    $result=mysqli_query($conn,$sql);
    if ($result) {
        header("Location: add_track.php?msg=1");
    } else {
        header("Location: add_track.php?msg=2");
    }
    
}


?>
