PHP get the value of a select and input whenever they are changed and query MYSQL

0

I have an input field that is a date that changes according to the date chosen in the calendar and 2 selects that are start and end times:

<input type="text" value="13-08-2017" name="pickdate">

<select id="inicio">
<option value="8">8:00</option>
<option value="9">9:00</option>
</select>

<select id="fim">
<option value="8">10:00</option>
<option value="9">11:00</option>
</select>

With this data (date, start and end) php makes a query in mysql to bring service providers available at these times.

SELECT *
FROM fcs_prestadores_pedidos
WHERE $var_entrada NOT BETWEEN hora_entrada AND hora_saida
AND $var_saida NOT BETWEEN hora_saida AND hora_saida

The query is ready and working, my question is: How do I always change the input or select, does it redo the query and update the result?

    
asked by anonymous 03.08.2017 / 17:21

0 answers