Cannot update database fields using model->save() |
Hi guys,
So I'm working on a CodeIgniter school project and I got stuck while trying to update the user profile. I cannot for the life of me figure out why model->save() does nothing in the db and model->replace works BUT my password isn't hashed before updating the db field with the new password. This is my controller function called "profile". PHP Code: public function profile() PHP Code: <?php The view file Code: <div class="container"> Any help is greatly apreciated.
Did you try using set on the data array?
PHP Code: $model->set($newData); If that wont work then you have problems else where in your code. What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
The problem was a typo in my Model. I wrote primarykey instead of primaryKey...
|
Welcome Guest, Not a member yet? Register Sign In |