Colleagues. I would like that when giving a post, the fields of the checkbox would be selected as the user selected. I did the form below, but it just leaves a field marked:
<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