Multiple functions for 1 Page |
[eluser]CI_Newb[/eluser]
Basically as i'm building this application, i'm learning alot but one thing that keeps coming up is that using multiple functions in the same controller for 1 page. Example. Site controller function 1 loads my edit page. Site controller function 2 takes edit function and info, validates it and sends to model then reloads function 1. Is this the right way to do it or should I be reworking the 1 function to handle it all instead of breaking it down to 2?
[eluser]techgnome[/eluser]
That's the way I'd do it... the thing I'm currently working on works that way. -tg
[eluser]CI_Newb[/eluser]
Awesome, just wanted to make sure I was on the right path. Learned most everything from all the video tutorials which are aweome ![]() I'm just afraid I'm creating more code than necessary but it looks like i'm on the right path.
[eluser]InsiteFX[/eluser]
If you find yourself using the same functions in multiple controllers. Read this: CodeIgniter Base Classes: Keeping it DRY InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |