• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Confusing simple problem

Hi all,

I know you help me out with my simple problem. I don't if it's a server problem or anything but I have this page:


If you click "Create Account" button, the next page would be a 404 message. As you can see the index function works out great but the register function is not and should just ouput "hello world". Am I missing something?

The code below is my default controller:

class Start extends Controller {

    function Start()
    function index()
        $data['title'] = "MR Barbershop and Urban Lounge | Member Directory";
        $template['content'] = $this->load->view('startpage', $data, TRUE);
        $this->load->view('template', $template);
    function register()
        echo "hello world";


Please don't mind this post. I wish I could kick myself! hahaha. Thanks for viewing anyway. I solved it already.

This is looking for a controller called register which, you need to add this to your routes file,

you can find out how to on the CI section on routes, if you enter the following I can find the register page.




$route['register'] = "start/register";

should do the trick!

Thank you Mackstar. Your suggestion is much better than the solution I just did. I know it will work. Thank you for replying.

Just to complete the post for anyone else who has this issue, the problem is that the URL is:
which is calling the index() function of the controller just fine. But the link on the index page directs to:
This omits the actual controller, which is 'Start'. The index page worked because it's the default, but the register page would need to be referenced from within the 'Start' controller, which means the URL should be:

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.