Welcome Guest, Not a member yet? Register   Sign In
Make a dynamic uri segment
#1

How can i make my application URL like this "mysite/username/home" where the username is dynamically changed according to the user that register in my site, and also each user has their own home...
-thanks for answer-
Reply
#2

Hi,

you can do it if you change the URL like this : http://mysite/home/username

PHP Code:
/* CONTROLLER HOME.PHP */
<?php
class Home extends CI_Controller {

 
  public function index($username)
 
  {
       // Check username
 
      // Load view
 
      // ...
 
  }


Reply
#3

SEE: Also _remap method
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply




Theme © iAndrew 2016 - Forum software by © MyBB