10-09-2009, 06:42 AM
[eluser]Samuurai[/eluser]
[quote author="Damien K." date="1254426833"]
[/quote]
Just a quick one.. if I set anything in my $data object here, I find it's unavailable when I pass it to my views back in my index() function (which is in my Contact controller). I've not come up against this before.. how do I get the variable which is set lower down to be accessible earlier in my script?
[quote author="Damien K." date="1254426833"]
Code:
function _populate_contact()
{
if($this->userlib->logged_in())
{
$this->load->model('User_model', 'user_m');
$userid = $this->session->userdata('userid');
$result = $this->user_m->name_and_email($userid);
}
}
Just a quick one.. if I set anything in my $data object here, I find it's unavailable when I pass it to my views back in my index() function (which is in my Contact controller). I've not come up against this before.. how do I get the variable which is set lower down to be accessible earlier in my script?