how to edit multiple input values
up vote
0
down vote
favorite

I have edit required fileds and also insert new input values as shown figure.I am trying to update to this fileds update only last filed value for all input values.
please tell me how to write code for this on.
views page
<?php foreach($todoInfo as $res)?>
<input type="text" class="form-control required" title="please enter Todo list Name" name="todo_list" id="todo_list" value="<?php echo $res->todo_list?>"><br>
<input type="hidden" class="form-control required" name="todo_list_id" id="todo_list" value="<?php echo $res->todo_list_id?>">
<?php ?>
<button class="add_field_button btn-success" style="float: right;margin: -33px -115px;">Add More Fields</button><br>
</div>
</div>
</div>
</div>
<!-- /.box-footer -->
</form>
Model
if(!empty($post))
foreach($post['todo_list'] as $value)
$todo_list_id=$post['todo_list_id'];
$tbl_user_details_array = array(
'A.todo_list' => $value,
'A.modified_by' => $userid,
'A.modified_date' => date('Y-m-d H:i:s')
);
$this->db->where("B.user_id", $user_id);
$this->db->update('ms_todo_list as A JOIN tm_user_details as
B ON B.user_job_role= A.role_id',$tbl_user_details_array);
return true;
else
return 0;
php jquery html css codeigniter
add a comment |
up vote
0
down vote
favorite

I have edit required fileds and also insert new input values as shown figure.I am trying to update to this fileds update only last filed value for all input values.
please tell me how to write code for this on.
views page
<?php foreach($todoInfo as $res)?>
<input type="text" class="form-control required" title="please enter Todo list Name" name="todo_list" id="todo_list" value="<?php echo $res->todo_list?>"><br>
<input type="hidden" class="form-control required" name="todo_list_id" id="todo_list" value="<?php echo $res->todo_list_id?>">
<?php ?>
<button class="add_field_button btn-success" style="float: right;margin: -33px -115px;">Add More Fields</button><br>
</div>
</div>
</div>
</div>
<!-- /.box-footer -->
</form>
Model
if(!empty($post))
foreach($post['todo_list'] as $value)
$todo_list_id=$post['todo_list_id'];
$tbl_user_details_array = array(
'A.todo_list' => $value,
'A.modified_by' => $userid,
'A.modified_date' => date('Y-m-d H:i:s')
);
$this->db->where("B.user_id", $user_id);
$this->db->update('ms_todo_list as A JOIN tm_user_details as
B ON B.user_job_role= A.role_id',$tbl_user_details_array);
return true;
else
return 0;
php jquery html css codeigniter
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite

I have edit required fileds and also insert new input values as shown figure.I am trying to update to this fileds update only last filed value for all input values.
please tell me how to write code for this on.
views page
<?php foreach($todoInfo as $res)?>
<input type="text" class="form-control required" title="please enter Todo list Name" name="todo_list" id="todo_list" value="<?php echo $res->todo_list?>"><br>
<input type="hidden" class="form-control required" name="todo_list_id" id="todo_list" value="<?php echo $res->todo_list_id?>">
<?php ?>
<button class="add_field_button btn-success" style="float: right;margin: -33px -115px;">Add More Fields</button><br>
</div>
</div>
</div>
</div>
<!-- /.box-footer -->
</form>
Model
if(!empty($post))
foreach($post['todo_list'] as $value)
$todo_list_id=$post['todo_list_id'];
$tbl_user_details_array = array(
'A.todo_list' => $value,
'A.modified_by' => $userid,
'A.modified_date' => date('Y-m-d H:i:s')
);
$this->db->where("B.user_id", $user_id);
$this->db->update('ms_todo_list as A JOIN tm_user_details as
B ON B.user_job_role= A.role_id',$tbl_user_details_array);
return true;
else
return 0;
php jquery html css codeigniter

I have edit required fileds and also insert new input values as shown figure.I am trying to update to this fileds update only last filed value for all input values.
please tell me how to write code for this on.
views page
<?php foreach($todoInfo as $res)?>
<input type="text" class="form-control required" title="please enter Todo list Name" name="todo_list" id="todo_list" value="<?php echo $res->todo_list?>"><br>
<input type="hidden" class="form-control required" name="todo_list_id" id="todo_list" value="<?php echo $res->todo_list_id?>">
<?php ?>
<button class="add_field_button btn-success" style="float: right;margin: -33px -115px;">Add More Fields</button><br>
</div>
</div>
</div>
</div>
<!-- /.box-footer -->
</form>
Model
if(!empty($post))
foreach($post['todo_list'] as $value)
$todo_list_id=$post['todo_list_id'];
$tbl_user_details_array = array(
'A.todo_list' => $value,
'A.modified_by' => $userid,
'A.modified_date' => date('Y-m-d H:i:s')
);
$this->db->where("B.user_id", $user_id);
$this->db->update('ms_todo_list as A JOIN tm_user_details as
B ON B.user_job_role= A.role_id',$tbl_user_details_array);
return true;
else
return 0;
php jquery html css codeigniter
php jquery html css codeigniter
asked Nov 10 at 5:39
GNN
125
125
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53236299%2fhow-to-edit-multiple-input-values%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown