Welcome Guest, Not a member yet? Register   Sign In
Attaching users id to my url structure
#11

[eluser]RalphLeMouf[/eluser]
The first two yielded the results you predicted, however the last one gave me this:

view hit
string(6) "234234"
#12

[eluser]RalphLeMouf[/eluser]
also please note I'm able to create www.mysite/account/profile/1234" dynamic with the signed in users id, I'm just unable to get it to load the page.
#13

[eluser]InsiteFX[/eluser]
Now take a look at this!
Code:
public function index()
  {
  $this->index();
}

Now what do you think is happening here?
#14

[eluser]RalphLeMouf[/eluser]
Good call. I got rid of that ( not sure if I should replace it with anything ) however, getting the same error!
#15

[eluser]Aken[/eluser]
[quote author="RalphLeMouf" date="1360714209"]The first two yielded the results you predicted, however the last one gave me this:

view hit
string(6) "234234"[/quote]
That's exactly what you should get.
#16

[eluser]RalphLeMouf[/eluser]
I'm trying to get it to automatically create that url when I am on a users profile or on my own profile. Not just type it into the url.
#17

[eluser]RalphLeMouf[/eluser]
Okay big breakthrough news! I'm able to get it to display the proper url with the users id off a link in the view like so:

Code:
<a href="/account/profile/&lt;?php echo $user['id']; ?&gt;">view me profile</a>

However - getting back to the main problem. I am unable to generate the SAME page and results off of my controller loading the same view. In other words, when I'm on the profile already I'm able to navigate but GENERATING the results from my controller I'm unable to.

Here is the controller:

Code:
public function profile()
{

     $this->load->helper('date');
     $this->load->library('session');
     $session_id = $this->session->userdata('id');
     $this->load->model('account_model');
     $user = $this->account_model->user();
     $data['user'] = $user;
     $data['profile_icon'] = 'profile';
     $data['main_content'] = '/account/profile/'.$user['id'];
     $this->load->view('includes/templates/profile_template', $data);

}




Theme © iAndrew 2016 - Forum software by © MyBB