Welcome Guest, Not a member yet? Register   Sign In
display from database
#13

[eluser]saidai jagan[/eluser]
[quote author="ceig" date="1265803861"]i hav set session in login page by
$this->session->set_userdata('$role');

$role is from database

then i used ur code to send the values
$data = array(
'page_title' => 'Students',
'students' => $students->result(),
'role_id' => $this->session->user_data('role_id');
);
$this->load->view('students/list',$data);


how to get this value in view
i hav to store it in a variable
please help[/quote]

By this code alter it to
Code:
$role_ids = array('role_id' => $role);
$this->session->set_userdata($role_ids);
$data = array(
                'page_title' => 'Students',
                'students' => $students->result(),
                'role_id' => $this->session->userdata('role_id');
            );
echo $data['role_id'];
Note : students/list is already there. I just copied the code.


Messages In This Thread
display from database - by El Forum - 02-09-2010, 04:38 AM
display from database - by El Forum - 02-09-2010, 12:35 PM
display from database - by El Forum - 02-09-2010, 10:14 PM
display from database - by El Forum - 02-09-2010, 10:44 PM
display from database - by El Forum - 02-09-2010, 11:23 PM
display from database - by El Forum - 02-10-2010, 12:11 AM
display from database - by El Forum - 02-10-2010, 12:19 AM
display from database - by El Forum - 02-10-2010, 12:29 AM
display from database - by El Forum - 02-10-2010, 12:59 AM
display from database - by El Forum - 02-10-2010, 02:17 AM
display from database - by El Forum - 02-10-2010, 02:29 AM
display from database - by El Forum - 02-10-2010, 02:37 AM
display from database - by El Forum - 02-10-2010, 03:27 AM
display from database - by El Forum - 02-10-2010, 04:34 AM
display from database - by El Forum - 02-10-2010, 04:49 AM
display from database - by El Forum - 02-10-2010, 05:05 AM
display from database - by El Forum - 02-10-2010, 10:55 PM



Theme © iAndrew 2016 - Forum software by © MyBB