Welcome Guest, Not a member yet? Register   Sign In
Parse error: syntax error, unexpected $end caused by foreach in view
#11

[eluser]InsiteFX[/eluser]
Create a new method and pass in the users id and fetch the data like the one above.

Code:
function get_user($id = '')
   {
    $this->db->where('id', $id);  // get users record
    $q = $this->db->get('membership');   // this would be changed to your users table name

    if($q->num_rows() > 0) {
      // return a single db row array $row['name'];
      return $q->row_array();
      // return a single db object $row->name;
      // return $q->row;      
     }
     return FALSE;
  }
}

Or if your seesion already contains the users id pass that in to the new method.

I wish you were home so that we could work together like before lol.

You need to show your profile table so that we can see what needs to be done...


Messages In This Thread
Parse error: syntax error, unexpected $end caused by foreach in view - by El Forum - 05-28-2012, 09:48 AM



Theme © iAndrew 2016 - Forum software by © MyBB