CodeIgniter Forums
help with the logic - 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: help with the logic (/showthread.php?tid=26225)



help with the logic - El Forum - 01-08-2010

[eluser]dadamssg[/eluser]
Ok so i have a website that stores and displays events. I have a Main controller to display each of the event categories.

I'm trying to recreate my login system using CodeIgniter. Do i create another controller that holds login functions and just call it into action in my Main controller? or should i put the login script in a model?

is it best practice to just have ONE controller or multiple?


help with the logic - El Forum - 01-08-2010

[eluser]Sean Gates[/eluser]
It shouldn't matter which you do. Both a single controller or multiple controllers, as long as it makes sense to you.


help with the logic - El Forum - 01-08-2010

[eluser]dadamssg[/eluser]
hmm alright. i have a LOT of forms in my website(login, register, comment, create an event, edit event, personal message, etc.). I'm trying to keep it as well organized as possible. I'm just didn't know if i could pass POST variables across different controllers and then onto different models. ...yeah im new at this whole MVC craziness


help with the logic - El Forum - 01-08-2010

[eluser]Sean Gates[/eluser]
Yes, you can POST to any page you want. Therefore, your login can be in a totally different controller, but the login can be initiated from anywhere.


help with the logic - El Forum - 01-08-2010

[eluser]dadamssg[/eluser]
alright thanks man