I am using CodeIgniter and I have two different controllers – login.php and site.php
In login.php
function credentials(){
$user = $this->input->post('username');
// there is some code here
}
In site.php, I have function members_area() I need to pass the variable $user from login.php to site.php. How do I do this ?
Thanks
If you are talking about user logins here.. In your
Logincontroller you verify user credentials. If so then you need to set a session variableThen in your
Sitecontroller you retrieve the data for that user from DB.And you get your required data from DB.