I'm developing a website that has a neighborhood search filter, where the person selects checkboxes in the neighborhoods. Then I need to get the values that are checked and play in a text (ex: Selected neighborhoods: Brooklin, Campo Belo)
The checkboxes are like this (it's a list with dozens of neighborhoods):
<div class="span3">
<input type="checkbox" value="43" name="bairro[]" id="bairro0"> Aclimação
</div>
<div class="span3">
<input type="checkbox" value="2" name="bairro[]" id="bairro1"> Alto da Boa Vista
</div>
<div class="span3">
<input type="checkbox" value="48" name="bairro[]" id="bairro2"> Alto da Lapa
</div>
If it is possible to get the name of the neighborhood already, in case I can not just get the value of the checkbox and make a query using mysql and php to bring the name.
When the person applies the filter and gives OK, the page already loads with the selected fields.
Thank you!