I am makeing a form where u can select a date and a time to make an apointment. The fields are of the type date and time.
<input type="date" name="date" placeholder="The date">
<input type="time" name="time" placeholder="The time">
I want to convert this input to a datetime format wich can be inserted with mysqli. what i tryd
$datetime = $date . $time
but it isn't a valid datetime. How can i convert it to a valid datetime so i can insert it in the database ?
edit
if i echo them after each other with a " " space between them i get 2018-05-05 03:05
the insert finishes but the data in the database is 0000-00-00 00:00:00 instead of the right date