<input type="checkbox" id="vehicle1" name="vehicle[]" value="Bike">
<label for="vehicle1"> I have a bike</label><br>
<input type="checkbox" id="vehicle2" name="vehicle[]" value="Car">
<label for="vehicle2"> I have a car</label><br>
We can have checkboxes with the same name by putting square brackets at the end of the
name
value. On server side we receive them whichever is checked as an array
by Valeri Tandilashvili
5 years ago
HTML
tags
HTML5 and CSS3 beginners tutorials
2
Pro tip: use ```triple backticks around text``` to write in code fences