Trying to update database with textarea... |
I'm trying to update my database with a textarea (name=postNote). But whenever I press the save button it saves a "0" in the request_notes field in the database no matter what I type in. Here is my view...
Code: <?php Code: public function saveNotes(){ Code: function isNote(){
for the update stuff you need a third parameter : the id or matching key of the dataset:
PHP Code: $this->db->update('mytable', $data, "id = 4"); Look here at the documentation: http://www.codeigniter.com/userguide3/da...-db-update
I think thats what the
$this->db->where('submit_time', $this->uri->segment(3)); does right above the $this->db->update('apps_request_notes', $data); Do you think maybe its because I didn't name my anchor and give any form action or method for my textarea?
Sorry . dont saw the where part, your right ;o)
For the Form stuff you have to sumit the form by an submit event: Code: <form action="/..." method="post"> You can't submit a form by an html anchor.
I figured it out. It was because I had no form_open, form_close, and I needed to change the anchor to a form_submit. Thanks
|
Welcome Guest, Not a member yet? Register Sign In |