1👍
✅
You can use array type name in the html to get the value in backend.
<form method="POST">
<select id="select-tag" name="tagging[]" multiple="multiple">
<option value="">Tagging Sample... </option>
<optgroup label="Type A">
<option value="Aa">Aa</option>
<option value="Ab">Ab</option>
<option value="Ac">Ac</option>
</optgroup>
<optgroup label="TypeB">
<option value="Ba">Ba</option>
<option value="Bb">Bb</option>
<option value="Bc">Bc</option>
</optgroup>
</select>
<input type="checkbox" value='00001' name="sample[]"></input>
<input type="checkbox" value='00002' name="sample[]"></input>
<input type="submit" value="Submit" class="submitted_btn" name="btn_action"></input>
</form>
Source:stackexchange.com