Welcome Guest, Not a member yet? Register   Sign In
Code logic in codeigniter
#3

You have two kinds of users, anonymous and not. These two users have separate needs. 

my quick suggestion would be: determine if the user is anonymous or not first.
And then have separate methods where appropriate so you aren't constantly having to check the same thing over and over.
Have separate methods in your controller that call the appropriate view. And then you can eliminate the logic checking in your views.
Reply


Messages In This Thread
Code logic in codeigniter - by sebastianvirlan - 08-24-2015, 01:54 PM
RE: Code logic in codeigniter - by mwhitney - 08-25-2015, 08:55 AM
RE: Code logic in codeigniter - by cartalot - 08-25-2015, 11:38 AM
RE: Code logic in codeigniter - by mwhitney - 08-25-2015, 01:41 PM
RE: Code logic in codeigniter - by cartalot - 08-25-2015, 03:34 PM
RE: Code logic in codeigniter - by mwhitney - 08-26-2015, 08:22 AM
RE: Code logic in codeigniter - by cartalot - 08-25-2015, 08:45 PM



Theme © iAndrew 2016 - Forum software by © MyBB