Multiple Checkbox Saving in MySQL? |
[eluser]dhall[/eluser]
I have an array that I pass from Controller to View to create a list of checkbox options for the User. Here is the view: Code: echo form_label('Secondary Activities:').br(1); How do I take the selected options and save them into a database table to then allow for reposting once saved? Sorry, I am new to all this stuff.
[eluser]heavyman1[/eluser]
Code: $data = array( You can use this to give each field name. So you can get the its value, by submitting the form. Code: $newsletter = $this->input->post('newsletter'); try to echo the var $newsletter to make u easier to understand
[eluser]dhall[/eluser]
My array consists of 17 options, which is dynamically generated when pulled from another database table. I don't think I could do that for all 17, and then having it be dynamic should the options change.
[eluser]heavyman1[/eluser]
I've never tried. But I believe you can use []. May be http://stackoverflow.com/questions/89022...lds-to-php will help |
Welcome Guest, Not a member yet? Register Sign In |