I want, when selecting multiple checkboxes, these values are saved in an array, so that it is saved in the database. If I leave the checkboxes with the same id, as follows:
<div class="form-group">
<label style="margin-bottom: 10px"> Dias disponíveis
</label><br />
<label><input type="checkbox" name="dias" id="dias"
value="Segunda-Feira"> Segunda-Feira</label><br />
<label><input type="checkbox" name="dias" id="dias"
value="Terça-Feira"> Terça-Feira</label><br />
<label><input type="checkbox" name="dias" id="dias"
value="Quarta-Feira"> Quarta-Feira</label><br />
<label><input type="checkbox" name="dias" id="dias"
value="Quinta-Feira"> Quinta-Feira</label><br />
<label><input type="checkbox" name="dias" id="dias"
value="Sexta-Feira"> Sexta-Feira</label>
</div>
The php already understands and places the marked options in the array directly after the submit using:
$chgeckboxes = $_POST['checkbox'];
Can anyone help?