<h3 class="border_heading"> Academic Details</h3>
<label class="col-sm-2 control-label">10th Class <span class="red-color">*</span></label>
<select class='form-control' name='year[]' id='year' value='' required>
<option value=''>Year</option>
<?php
for($i=2020;$i>=1970;$i--){
echo "<option value='$i' ".set_select('year[]',$i, ( !empty($data) && $data == $i ? TRUE : FALSE )).">$i</option>";
}
?>
</select>
<label class="col-sm-2 control-label">12th Class <span class="red-color">*</span></label>
<select class='form-control' name='year[]' id='year' value='' required>
<option value=''>Year</option>
<?php
for($j=2020;$j>=1970;$j--){
echo "<option value='$j' ".set_select('year[]',$j, ( !empty($data) && $data == $j ? TRUE : FALSE )).">$j</option>";
}
?>
</select>
In the above code I am trying to set value of dropdown. Now, What happen when I select different value of both dropdown then click on submit button then first dropdown show second dropdown value. So, How can I set different value using set_select function? Please help me.
Thank You
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…