CodeIgniter Forums
View no calling the Controller functions? - 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: View no calling the Controller functions? (/showthread.php?tid=29860)



View no calling the Controller functions? - El Forum - 04-23-2010

[eluser]saiya[/eluser]
Hi,

I set up a test script and set up my controller test and loaded the view test

i made a form, but when i clock on the submit button it calls the controller test and throws out

a 404 error.

/test/register cannot be count

where test is the controller and register is the function name.

in the url it loads as ww.example.com/test/register


what could be the cause?


View no calling the Controller functions? - El Forum - 04-23-2010

[eluser]pickupman[/eluser]
Have you edited .htaccess to support removing the index.php file from the url. Try using http://www.example.com/index.php/test/register.

Can you post the form part of your view?


View no calling the Controller functions? - El Forum - 04-24-2010

[eluser]paperdomino[/eluser]
Hi saiya, you could try checking your .htaccess file like pickupman suggested.

Also, since it might just be the form itself, check to make sure that all of the form's html code is correct. Also check to make sure the html for any form displayed before the problematic code is also correct (fully closed tags etc)


View no calling the Controller functions? - El Forum - 04-24-2010

[eluser]saiya[/eluser]
hey guys, I think pickupman had it right on. I invoked the index.php/test/register and it loaded the function correctly.

I deleted teh index.php from the config.php but I had forgotten to move my .htaccess over to my new directory structure.

You guys are fast with the replies!

Just picked up CI a few days ago and I'm trying to convert one of my existing sites over to the CI Framework/Doctrine and see how I'll like it in the long run, but one thing is for sure. The way to code things is different but also cuts my some time Wink