Welcome Guest, Not a member yet? Register   Sign In
Sending data from one controller to another
#4

(This post was last modified: 04-20-2016, 09:12 AM by Wouter60.)

Create a model that performs the operation in your database.
Autoload the model in application/config/autoload.php
From any controller:
PHP Code:
$this->mylog_model->writelog(); 

If you want to be flexible to what data is passed to the model's method, use an array, e.g.
PHP Code:
$this->mylog_model->writelog($data);   //$data is an array that is processed by your model. 
Reply


Messages In This Thread
RE: Sending data from one controller to another - by Wouter60 - 04-20-2016, 09:08 AM



Theme © iAndrew 2016 - Forum software by © MyBB