I am always short of logic when every things works fine then i come up with new problem?
PROBLEM There are generally 6 user type accounts.Everyone has their own "edit profile page".Now i want to know how can i handle this.user login then directed to home page then in navbar it has option edit profile etc. how can i load a edit profile view for crosponding user type.like if user type 1 login then load edit profile page for user type 1,if user type 2 login then edit profile page for user type 2 is loaded? I am using codeigniter framework?plz help
Update profile controller
public function get_user_data() {
if($this->session->userdata['sessiondata']['user_id'] !=null) {
$id=$this->session->userdata['sessiondata']['user_id'];
$data['countryDrop'] = $this->Country_states_cities->getCountries();
$result=$this->Edit_profile->get_user_data($id);
$result=$result[0];
$this->load->view('header');
$this->load->view('edit_profile', array_merge($data,$result));
}
else {
redirect(base_url("HomeController/index"));
}
}
/*
Function for updating user data
**/
......
in header view i set this
if user login
<li><a title="Set profile picture and update info" href="<?php echo base_url('Update_profile/get_user_data') ?>">Edit Profile</a></li>
you can see if user is login then above controller is called and edit profile will be loaded now i want diiferent edit profile page to be loaded depending upon user type?
So i have problem in thinking and implementing the logic!!plz help