Problem passing data to model. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Problem passing data to model. (/showthread.php?tid=53275) |
Problem passing data to model. - El Forum - 07-17-2012 [eluser]Stromgren[/eluser] Hello Im currently doing a registration form but i got some problems. In my registration view i've got a couple og checkboxes like this: Code: <?php foreach($interests->result() as $interest): ?> The interests are stored in a table with an ID and a Name column. In the controller the data is recieved like this: Code: $username = $this->input->post('username'); And the registration model looks like this: Code: function register_user($username, $email, $password, $country, $city, $interests, $setup, $job, $bio, $activation_code) Now in the foreach statement i want to create a row in users_interests table containing the interest ID and the user ID for every interest checked, but i seems i am recieving the information incorrectly? Can anyone help? Thanks in advance.. |