Quantcast
Channel: CodeIgniter Forums - All Forums
Viewing all articles
Browse latest Browse all 14343

aren't cookies global?

$
0
0
I am having an issue with my app. I am using two different Codeigniter addons, codexworld's "user registration and login" and Grocery Crud. My app starts out allowing a user to login with "user reg and login". This happens in controller A. Once they login I store their userid in a cookie using the CI cookie helper. Then I redirect to controller B which contains the Grocery Crud. I try to read the userid cookie that I set with controller A, in a function in controller B,  but it is blank. 

I am loading the cookie helper in each controller with 

$this->load->helper('cookie')

Does anyone know how I can get the userid from controller A to be used by functions in controller B? I am out of ideas of how to save the USERID in a global session variable for this user. 

Viewing all articles
Browse latest Browse all 14343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>