Welcome Guest, Not a member yet? Register   Sign In
The worst code I've written :(
#2

[eluser]Colin Williams[/eluser]
The View code looks a lot like the way I've been doing it all along. I mean, if you really want to, you could do a loop that sets a value of either 'checked' or NULL to a string or array value for every checkbox, then just echo the respective var in the loop that prints out the checkbox. But, is it really necessary?

Also, the Validation class has a set_checkbox() method:

Code:
<input type="checkbox" name="mycheck" value="1" <?php echo $this->validation->set_checkbox('mycheck', '1'); ?> />


Messages In This Thread
The worst code I've written :( - by El Forum - 08-13-2008, 09:47 AM
The worst code I've written :( - by El Forum - 08-13-2008, 01:16 PM
The worst code I've written :( - by El Forum - 08-13-2008, 01:26 PM
The worst code I've written :( - by El Forum - 08-14-2008, 05:48 PM



Theme © iAndrew 2016 - Forum software by © MyBB