moon 111 Posted April 17, 2008 Share Posted April 17, 2008 This is the problem: The router takes the end of the url and uses it to choose the correct controller. If the url is '/members/view' it includes the the page members.php which contains the class Controller_Members, creates and instance of it and calls the function view. If it were only '/members/' it would call the function 'index'. The problem is if I want to view a specific user. My idea is to take the extra things in the url (if any) and pass them as arguments so if its '/members/view/143' it will pass 143 as an argument to 'view'. Is this a good idea? Thanks Quote Link to comment Share on other sites More sharing options...
Daniel0 Posted April 17, 2008 Share Posted April 17, 2008 I believe that's how it's quite often done. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.