You can make a php query inside javascript?
Hello I have a small query, what happens is that I have a form, more specifically, an input type text that uses flatpickr to select a date, then I also have a select with several options ie the options are schedules ranging from 10AM to 11AM ranging from 15 minutes. The thing is the following, how would I do it so that when selecting a date it goes to the database to make a query that verifies that schedules exist with that date. And then come to the Select options and disable the ones that are already in the database. For example, let's suppose that in the database I have two records with the date 2021-03-11, and for the first one it has the schedule 10:00 and the second one 10:45. Then if I in the input selected that same date 2021-03-11, then go to the database make the query, and disable the schedules that you have in this case would be 10:00 and 10:45. With this I hope to explain myself, whoever helps me I will be eternally grateful. Please help me, I don't know how to do this.