![]() |
Posting forms to self or new function - 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: Posting forms to self or new function (/showthread.php?tid=35613) |
Posting forms to self or new function - El Forum - 11-04-2010 [eluser]Unknown[/eluser] Hello, I am new to MVC and frameworks so sorry if this is a dummy question. Previously working with plain PHP I have submitted forms to the same page then in the code put: Code: if($_POST) { From all of the online tutorials I have noticed people post forms to a new function similar to the following: Code: class User extends Controller { Is this the right way of going about things or can I post to the same function if I want? It seems that for things like admin areas where there are lots of forms I will need double the amount of functions especially when the login() function appears to just serve a view and doesn't particularly do anything else. Thanks Dave. Posting forms to self or new function - El Forum - 11-04-2010 [eluser]jrtashjian[/eluser] I like to submit forms to the same function. There is no right or wrong way to do it. Do what works for you. The first way works for me. Posting forms to self or new function - El Forum - 11-04-2010 [eluser]Drubo[/eluser] Very good question and as well the answer. Posting forms to self or new function - El Forum - 11-07-2010 [eluser]Unknown[/eluser] Thanks for your responses. Think I'll stick with everything in one function. Dave/ |