I have a multiple select dropdown field in html which has to return multiple values but it is returning only single value.
<select name="select[]" multiple>
<OPTGROUP label="cars">
<option value="car1">car1</option>
<option value="car2">car2</option>
<option value="car3">car3</option>
</OPTGROUP>
<OPTGROUP label="bikes">
<option value="bike1">bike1</option>
<option value="bike2">bike2</option>
<option value="bike3">bike3</option>
Below is the PHP to return the multiple values that are selected:
$select = mysqli_real_escape_string($link, $_POST['select']);
Thanks in advance.