My site needs a way to know whether a user is an admin or not in multiple pages. So is it safe to store whether a user is an admin or not in session variable? Or is there a better alternative (Maybe another superglobal variable?), It will only hold a number.
athulram
0
Newbie Poster
Recommended Answers
Jump to PostHey,
Yes, I would say it's safe, well, safer than using something like a cookie (Because a SESSION is server side). You could also store the users IP (or other validation checks) which are then checked everytime the data is then used. This could be one option. Also destroy the …
All 3 Replies
phorce
131
Posting Whiz in Training
Featured Poster
veedeoo
474
Junior Poster
Featured Poster
BenzZz
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.