These are my html inputs
<input id="6" type="date" name="start_date">
<input id="7" type="time" name="start_time"><br>
<input id="8" type="date" name="end_date">
<input id="9" type="time" name="end_time"><br>
Then I use the post method to claim them like this
$start_date = (string) $_POST['start_date'];
$start_time = (string) $_POST['start_time'];
$end_date = (string) $_POST['end_date'];
$end_time = (string) $_POST['end_time'];
and finally execute the query like this
$dateTimeStart="$start_date.' '.$start_time";
$dateTimeEnd="$end_date.' '.$end_time";
$dateTimeStart = date("Y-m-d H:i:s",strtotime($dateTimeStart));
$dateTimeEnd = date("Y-m-d H:i:s",strtotime($dateTimeEndime));
$sql="INSERT INTO appointment (prof_id, student_id, app_start, app_end) VALUES ('$prof_id', '(SELECT user_id FROM user WHERE firstname='$stud_first' AND lastname='$stud_last')', '$dateTimeStart', '$dateTimeEnd');";
mysqli_query($conn, $sql);
But there seems to be something wrong.. can u help me?