I have a codeigniter web application which has two buttons guest or user. The whole application uses the same pages whether you are a guest or user, but if you click the user button I want it to bring the user to a login page, I can do that, but I need to be able to set a global variable, only if the user uses the user/login button.
Share
I would set some sort of session data when processing the form submission for the user login. Something like:
That is as close as you’ll get to setting global data.