How to convert date format from html to sql using php?
I want to convert only the date, not date and timestamp, but if I use the 'strtodate' function it backdates the date i selected to 1970. pls help. my code is below. if ( isset( $_POST['book_app'] ) ) { $patient_id = $_POST['patient_id']; $appointment_date = $_POST['appointment_date']; $doctor = $_POST['doctor']; $appointment_time_starts = $_POST['appointment_time_starts']; $appointment_time_ends = $_POST['appointment_time_ends']; $query = "insert into doctorapp (patient_id, appointment_date, doctor, appointment_time_starts, appointment_time_ends) values('$patient_id', '$appointment_date', '$doctor', 'appointment_time_starts', 'appointment_time_ends') ";