How do I store dynamic radio button input in a MySQL database using codeigniter?

Payton_Oregon

New Member
I know how to store static radio buttons (where the names do not change) but what about where the name is dynamically taken from a database.Example: The control\[code\]$this->load->model('model_name');$var = array( 'db_column_name' => $this->input->post('radio_btn_name'));$this->model_name->function_name($var);\[/code\]The view\[code\]echo form_radio('radio_btn_name','myValue', false);\[/code\]Ok but what about this Example: The view\[code\]echo form_open('control/form_event');foreach ($query as $q) :echo form_label($q['label_from_db'],$q['name_from_db']);echo form_radio($q['name_from_db'],$q['value_from_db'], false);endforeach;echo form_submit('submit', 'Submit');echo form_close();\[/code\]How would I write the controller fro the dynamic radio button?
 
Back
Top