CodeIgniter Forums

Full Version: Updating and creating text input with one submit.. how do I do this?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]puffnstuff[/eluser]
-


I have a loop displays multiple inputs and one submit. How do I get it so where each item that is updated gets entered in the correct field?

El Forum

[eluser]michalsn[/eluser]
In model use:
Code:
$this->db->where('id',$id);
$this->db->update('skills', $data);
or:
Code:
$this->db->update('skills', $data, array('id' => $id));

User guide is your friend: http://ellislab.com/codeigniter/user-gui...tml#update

El Forum

[eluser]puffnstuff[/eluser]
[quote author="michalsn" date="1346309852"]In model use:
Code:
$this->db->where('id',$id);
$this->db->update('skills', $data);
or:
Code:
$this->db->update('skills', $data, array('id' => $id));

User guide is your friend: http://ellislab.com/codeigniter/user-gui...tml#update[/quote]

Still not updating

El Forum

[eluser]puffnstuff[/eluser]
What I ended up doing was echoing the id for the name of each input. Works now.