![]() |
URL - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: URL (/showthread.php?tid=12683) |
URL - El Forum - 10-27-2008 [eluser]Praveen A P[/eluser] Hello, I am trying out CI for the first time. SO if this sounds dumb, please bear with me and help me. I have a controller, it points to first view page. The first view page has a link to register, When i click on register, It comes back to the controller and from there, it is sent to the next view. The next view has a form with fields to enter Username and Password, and a Register button. When I click on register, It displays 404 page. Expected behaviour, I have and echo statement in the controller where it should go next, however, it does not go to that function. Please help me. Here is the code if it helps. Controller Code Code: <?php First view page Code: <html> This is the next view Code: <html> THIS IS THE VIEW THAT SHOULD BE DISPLAYED WHEN I SUBMIT THE FORM Code: <html> The Problem I am facing is that when I submit the form I get a 404 page not found error. Also, when I see the URL it looks quite weired. here it is: Code: http://localhost/ts/index.php/ts_start/index.php/ts_start/register Is there some problem with the URL? Please help me. URL - El Forum - 10-27-2008 [eluser]dbashyal[/eluser] [quote author="Halwa Raj" date="1225182740"]Hello, Also, when I see the URL it looks quite weired. here it is: Code: http://localhost/ts/index.php/ts_start/index.php/ts_start/register Is there some problem with the URL? Please help me.[/quote] check your base_url in config, what have you set? URL - El Forum - 10-27-2008 [eluser]Praveen A P[/eluser] The base url is: $config['base_url'] = ""; Earlier it was http://yoursite.com So it was always trying to go to yoursite.com. I just made it empty. I have tried localhost/ts but to no avail. Please help me. URL - El Forum - 10-27-2008 [eluser]dbashyal[/eluser] $config['base_url'] = 'http://localhost/ts/'; URL - El Forum - 10-27-2008 [eluser]Praveen A P[/eluser] thanks alot man I was struck with this since yesterday. These forums are indeed useful. URL - El Forum - 10-27-2008 [eluser]dbashyal[/eluser] [quote author="Halwa Raj" date="1225190872"]thanks alot man I was struck with this since yesterday. These forums are indeed useful.[/quote] welcome mate. |