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 time:
<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 the following: How to make so that whenever the input or select is changed, it redoes the query and update the result?
This one using Jquery?
– Roberto de Campos
You will need javascript. If you are using Jquery you can make a query via ajax.
– touchmx
You’ve done something already jQuery?
– Sr. André Baill
did little jQuery, was using javascript
– Leandro Marzullo