![]() |
Simple checkbox question with array insertion - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Simple checkbox question with array insertion (/showthread.php?tid=32071) |
Simple checkbox question with array insertion - El Forum - 07-12-2010 [eluser]Unknown[/eluser] Hi I'm fairly new to all of this CodeIgniter stuff and so far is has been awesome! Now I have been following a few great tutorials but I have hit a small problem. I have successfully set up 7 checkboxes to store as an array however I'm at a loss on how to get said array into the database. Here is my view: Code: <label for="services">Services Needed: <span id="emph">(select all that apply)</span></label> And my controller (with some functional code for inserting strings into the database to show you what I am up to): Code: $c = new Client(); Now those last 7 inputs are obviously incorrect but I left them that way so you can see the desired structure of the database. Now a bit of searching has shown me I need to do some foreach loops but I'm at a loss where to start. A bit of guidance would be greatly appreciated as I am sure this is elementary! -michael Simple checkbox question with array insertion - El Forum - 07-12-2010 [eluser]Unknown[/eluser] Doh. Looks like this was the wrong place to put this! I just followed a search engine here and everyone else had asked for help here too ![]() |