prepare( "INSERT INTO file_row_update (id_user, id_file_row, time_pickup, time_depart, bol_delivered) VALUES (:id_user, :id_file_row, STR_TO_DATE(:time_pickup, '%m/%d/%Y %h:%i %p'), STR_TO_DATE(:time_depart, '%m/%d/%Y %h:%i %p'), STR_TO_DATE(:bol_delivered, '%m/%d/%Y %h:%i %p') )"); try { $ret = $stmt->execute(array( ':id_user' => $id_user, ':id_file_row' => $id_file_row, ':time_pickup' => $time_pickup, ':time_depart' => $time_depart, ':bol_delivered' => $bol_delivered )); } catch(Exception $e) { http_response_code(500); //TODO: probably shouldn't report this internal exception message to the user echo $e->getMessage(); return; } echo 'OK'; ?>