0
I have a search with a select that can select more than one option, but I don’t know how to make them search all the selected options.
Currently it does the search, inserts the values in the url (I am using GET
), but can’t do the SELECT
of all values. Below the code snippet:
<form method="get">
<select name="bairro">
<option>A</option>
<option>B</option>
<option>C</option>
</select>
</form>
and consultation:
$bairro = $_GET['bairro'];
$query=("SELECT * FROM terrenos WHERE bairro = '".$bairro."'"};
If I select A and B for example, the URL is &bairro=A&bairro=B
, but hence the $_GET
only takes 1 neighborhood, how do I use all to return to the query?
Thank you!