Running out of time here so here goes coz I have a defense the day after tomorrow. So here goes: I’m trying to save a multiple checkbox but somehow cant get it right.
Code:
<form method="post" action="<?php echo base_url()?>admin/requirements"> <table cellpadding="0" cellspacing="0" border="0" width="100%"><tbody> <tr><td colspan="3"></td> <td colspan="8" align="center"><font size="6px"></font> R E Q U I R E M E N T S</td></tr> <th width="150">Names</th><th width="40" style="font-size: 10px;">Projects</th> <th width="40">Res</th><th width="40">Und</th><th width="40">WnP</th> <th width="40">MOA</th><th width="40">DTR</th><th width="40">Doc</th> <th width="40">Ref</th><th width="40">Pho</th><th width="40">Vid</th> <?php foreach($req_list->result() as $item){ echo "<input type='hidden' name='student[]' value='".$item->student_id."'>"; echo "<tr><td>".$item->fullname."</td>"; echo "<td><a href='".base_url()."admin/projects_view/".$item->g_id."'>Group ".$item->group_no."</a></td>"; echo "<td><input type='checkbox' name='res[]' value='1'></td>"; echo "<td><input type='checkbox' name='und[]' value='1'></td>"; echo "<td><input type='checkbox' name='wnp[]' value='1'></td>"; echo "<td><input type='checkbox' name='moa[]' value='1'></td>"; echo "<td><input type='checkbox' name='dtr[]' value='1'></td>"; echo "<td><input type='checkbox' name='doc[]' value='1'></td>"; echo "<td><input type='checkbox' name='ref[]' value='1'></td>"; echo "<td><input type='checkbox' name='pho[]' value='1'></td>"; echo "<td><input type='checkbox' name='vid[]' value='1'></td>"; echo "</tr>"; }?> </tbody></table> <div align="center"> <button type="submit" class="button" id="deleteb"><div><b> Save Setting </b></div></button> <input type="hidden" name="save" value="save"/></div> </form>
Comment