I have two Controller such as doc.php, user.php in controller folder and a registration.php in a view folder, which have a registration form. i want to pass the registration info from registration.php to doc.php controller via user.php. How can i do this? Need help.
What is your codeigniter version ? 2.x or 3.x ?
Try to use session to save your array.
To initialize the Session class manually in your controller constructor, use this method:
$this->load->library();
Once loaded, the Sessions library object will be available using:
$this->session
You can set you session name, using this code :
$this->session->your_session_name;
Use this to add an item in your session :
$this->session->your_session_name('item_one');
To retrieve your session, use this code :
$this->session->your_session_name;
Check this for CodeIgniter 3.X
Check this for CodeIgniter 2.X
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With