Session vs Query Help

#4
[eluser]Tri Dang[/eluser]
Sorry if I don't understand you clearly.

What I see here is you pass in $data variable to the view. And what is your code in the view to display the profile data?

If you use:
Code:
function profile(){
    $this->load->model('users');
    $this->db->where('id',$this->uri->segment(3));
    $query = $this->db->get('users');
    $data = $query->row_array();
    $this->load->view('profile', $data);
}
Then in your view, $id, $firstName etc... will point to the correct value in the database (assume your users table has fields with these names).


Messages In This Thread
Session vs Query Help - by El Forum - 01-31-2009, 08:00 PM
Session vs Query Help - by El Forum - 01-31-2009, 08:40 PM
Session vs Query Help - by El Forum - 01-31-2009, 08:44 PM
Session vs Query Help - by El Forum - 01-31-2009, 09:04 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.