I am developing an application with codeigniter. My issue is iam not able to post value from second check box(checkbox in else condition).
View page
<div class="form-group">
<?php if($pro[0]['p_featured']==1){ ?>
<label class="checkbox-inline">
<input type="checkbox" value="1" name="featured" checked>featured
Product</label><?php } else {?>
<label class="checkbox-inline">
<input type="checkbox" value="2" name="featured" >featured
Product</label>
<?php } ?>
</div>
My controller
echo $this->input->post('featured'); exit;
I am able to post value from first condition. But not able to POST value from second condition