1
I am building a comment system and I would like when the user selects the value of a select field, a variable is sent to a PHP page with the selected value, and the same returns the results within a div.
<form>
<div class="campo">
<label>Ordenar por: </label>
<select id="ordenar" name="ordenar">
<option>Relevância</option>
<option>Mais Recente</option>
</select>
</div>
<div class="campo">
<label>Comentários apenas de: </label>
<select id="filtroComentarios" name="filtroComentarios">
<option>Professores</option>
<option>Estudantes</option>
</select>
</div>
</form>
<div id="comentarios"> </div>
//Div que recebe os comentários filtrados
Thank you very much, it worked perfectly, but as I would pass the two selects ?
– Matheus Cardoso Reyes
I edited the answer, see if it works. Are only two selects you want to use even?
– KillerJack
Man, it worked perfectly, thank you very much!
– Matheus Cardoso Reyes