0
Colleagues. I would like that when giving a post, the checkbox fields were selected as the user selected. I did it the way down, but it only leaves marked a field:
<input type="checkbox" id="seg" name="DiaSemana" value="segunda-feira" <?php if(filter_input(INPUT_POST, "DiaSemana") == "segunda-feira"){ echo "checked"; } ?>> Seg
<input type="checkbox" id="ter" name="DiaSemana" value="terça-feira" <?php if(filter_input(INPUT_POST, "DiaSemana") == "terça-feira"){ echo "checked"; } ?>> Ter
<input type="checkbox" id="qua" name="DiaSemana" value="quarta-feira" <?php if(filter_input(INPUT_POST, "DiaSemana") == "quarta-feira") echo "checked"; ?>> Qua
<input type="checkbox" id="qui" name="DiaSemana" value="quinta-feira" <?php if(filter_input(INPUT_POST, "DiaSemana") == "quinta-feira") echo "checked"; ?>> Qui