Welcome Guest, Not a member yet? Register   Sign In
CI Sessions and Company-Specific Data
#1

[eluser]derekmichaeljohnson[/eluser]
I have a "dashboard" controller which displays company-specific information based on the ID passed to the URI.

Code:
ID       Company           Access Code
1        Orange, Inc.      123
2        Grape, Inc.       456

etc, etc
But I don't want just anyone to be able to see ANY company's information, hence the "access code" field. What's the best way, using CI Sessions, to display the appropriate information IF the correct access code has been entered?

I was thinking a login form with a dropdown of all the companies and a password field. ONCE the password is validated, the ID of the company is stored in his/her session. Then in my controller, I display the company information BASED ON the company ID stored in the session (if there is one). If there isn't, it redirects to the login page.

Any suggestions for making this more efficient or even easier?


Messages In This Thread
CI Sessions and Company-Specific Data - by El Forum - 05-30-2009, 06:20 AM
CI Sessions and Company-Specific Data - by El Forum - 05-30-2009, 07:26 AM
CI Sessions and Company-Specific Data - by El Forum - 05-30-2009, 07:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB