Insert checkboxes values to database with assigned field |
[eluser]Ignis Avis[/eluser]
I am inserting values like below from my form Code: <span class="field"><input type="text" name="item_name" id="item_name" class="input-small" value="<?php echo set_value('item_name'); ?>" /> for first field I wanna insert into following item_table Code: +----------+--------------+ for second field I want to insert checkboxes values to following table like these. Code: +----------+--------------+ Code: $item_name = $this->input->post('item_name'); How should I insert checkboxes values to second table according to Item id?
[eluser]rajneeshgobin[/eluser]
i have a similer problem i have somehow managed to find a way to do that, feel free to optimise my solution view [ here i am listing the checkboxes, for me the sub checkbox falls under some main category Code: <table > this is the option_submit i am calling to save the options [ <?php echo form_open('usersctrl/option_submit/',array( 'id' => 'useradd')); ?>] Code: public function option_submit($page = 'option_add') me i am saving the checkbox vs user id. Code: function insertuseritemOptions() table user id | username | pass ... table user_item_options id | userID|item_option_id userID is the user item_option is theid of the item itemoption id|itemoption|item_id here its like which item suport which options ie like item_id 1 has mouse [itemoption] item_id 1 has keyboard item_id 2 has ups ect table item id|itemName this is just list of item for example computer1 computer2
[eluser]rajneeshgobin[/eluser]
Code: $( document ).ready(function() { i forgot to put this jquery |
Welcome Guest, Not a member yet? Register Sign In |