Reputation: 153
i am not being able to submit these value in my controller. the code is as follows
<input name="status.<?php echo $data['LEAVE_ID']?>" type="radio" class="ace" value="1" checked="" required="" />
<span class="lbl"> YES</span>
<input name="status.<?php echo $data['LEAVE_ID']?>" type="radio" class="ace" value="0"/>
<span class="lbl"> NO</span>
Upvotes: 0
Views: 239
Reputation: 9297
You can achieve it using below code, you just have to add css.
<?php
foreach($dataArrry as $data) {
echo $_POST['status.' . $data['LEAVE_ID']]."<br/><br/>";
}
?>
Upvotes: 0
Reputation: 12085
For multiple radio use array
in name attribute
with id
as a index key
like this
name="status[<?php echo $data['LEAVE_ID']?>]"
Upvotes: 1