I want to display several months at once. Currently showing only one month. When I try to select multiple months, it only shows one. What could be wrong with my code? Thank you very much for the reply.
Here is my code:
for($i=1;$i<=30;$i++){
$place_of_counselling=get_field('noustamise_koht'.$i.'',$post->ID);
$date=date_create(get_field('noustamise_kuupaev'.$i.'',$post->ID));
if(date('m')!= date_format($date,"m") && !isset($_POST['month'])){
continue;
}elseif($_POST['month'] != date_format($date,"m")){
continue;
}
and the form code:
<form action="" method="post">
<input type="checkbox" id="01" name="month" value="01"> Jaanuar<br>
<input type="checkbox" id="02" name="month" value="02"> Veebruar<br>
<input type="checkbox" id="03" name="month" value="03"> Märts<br>
<input type="checkbox" id="04" name="month" value="04"> Aprill<br>
<input type="checkbox" id="05" name="month" value="05"> Mai<br>
<input type="checkbox" id="06" name="month" value="06"> Juuni<br>
<input type="checkbox" id="07" name="month" value="07"> Juuli<br>
<input type="checkbox" id="08" name="month" value="08"> August<br>
<input type="checkbox" id="09" name="month" value="09"> September<br>
<input type="checkbox" id="10" name="month" value="10"> Oktoober<br>
<input type="checkbox" id="11" name="month" value="11"> November<br>
<input type="checkbox" id="12" name="month" value="12"> Detsember<br>
<input type="submit" value="Otsi" name="submitbutton" >
</form>