Here is my code so far, it all works except when I try to make 'company' = $company there's something im missing, and id love to know what\[code\]if($query) // if the user's credentials validated/// { $this->db->where('username'); $this->db->select('company'); $company = $this->db->get('user'); $data = http://stackoverflow.com/questions/2112330/array('username' => $this->input->post('username'), 'company' => $company 'is_logged_in' => true ); $this->session->set_userdata($data); redirect('site/members_area'); } else { $this->index(); }\[/code\]