Add the multiple attribute to the <select> tag.
<label for="fruits">Choose fruits:</label>
<select name="fruits[]" id="fruits" multiple size="4">
<option value="mango">Mango</option>
<option value="apple">Apple</option>
<option value="banana">Banana</option>
<option value="grapes">Grapes</option>
</select>multiplelets the user select more than one option: hold Ctrl (Windows) or Cmd (Mac) and click, or Shift-click for a range.sizesets how many options are visible at once.- The name
fruits[]lets a PHP server receive all selected values as an array.
Without multiple, a <select> allows only one choice. Checkboxes are another way to allow several choices.