php,codeigniter,checkbox,repopulation
Add this statement after value attribute show the correct code. if(validation_errors()){echo set_checkbox('genre[]', $getd['name']);} <tr> <td>Title</td> <td><input type="text" name="title" value="<?php if(!empty($mid)){echo $movie1['title'];}elseif(validation_errors()){echo set_value('title'); } ?>"></td> <td><?php echo form_error('title'); ?></td> </tr> <tr> <td>Genre</td> <td> <?php if(!empty($mid)) { $g=explode(",",$movie1['genre']); }...