how to make update function |
[eluser]yudahebat[/eluser]
please help me... I dont know how to update my database where I put the function?? model or controller???
[eluser]TheFuzzy0ne[/eluser]
The model. The model is responsible for handling your stored data. The controller should call the model.
[eluser]pistolPete[/eluser]
I assume you want to update a specific database entry, correct? You should put any database related functions into the model. If you use Active Record, there is an update() function: Code: $this->db->update(); Read the user guide.
[eluser]yudahebat[/eluser]
thx.. can you give me an example?? I'm beginner the situation : I have a form that update only password the form is username : admin password :.... confirm paswword :... update | reset how to update??
[eluser]TheFuzzy0ne[/eluser]
It would help if we could see your controller and view.
[eluser]yudahebat[/eluser]
this is my controller Code: <?php
[eluser]yudahebat[/eluser]
this is my view Code: <?php $this->load->view('header'); ?>
[eluser]yudahebat[/eluser]
what should I do to make update function??? do I make a controller that call model for update function???
[eluser]TheFuzzy0ne[/eluser]
Your controller doesn't seem to tie in with what you're asking. Please [url="http://ellislab.com/forums/viewthread/107773/"]check out this thread[/url]. It should help you gain a deeper knowledge of how to build applications with CodeIgniter. But yes, you need to create a function called something like "change_password", and that function should do any validation, call the model if necessary and load the view.
|
Welcome Guest, Not a member yet? Register Sign In |