Welcome Guest, Not a member yet? Register   Sign In
uri segments question
#1

[eluser]Unknown[/eluser]
I have a link on my homepage which points to another controller:

Code:
<p><a href="&lt;?php echo base_url() . 'index.php/user/' . $user-&gt;id; ?&gt;">contact</a></p>

In my user controller I have the following code (for debugging purposes):

Code:
class User extends CI_Controller {


function index($user_id=0) {
  echo $user_id;
}

}

It's giving me a 404 error when I click the link on my homepage. Can someone please tell me why?

Thank you.




Theme © iAndrew 2016 - Forum software by © MyBB