persistent variable / calendar user-group
Posted: Sun Feb 01, 2009 11:21 pm
Let me say at the outset that I am fairly new to PHP.
I am modifying a calendar script which has multiple adminstrators who can edit their own entries. I would like to give an associated group of users access so that they only see the entries of one of the admins. (Later on I hope to expand it so that a particular user can view the entries of several admins.) I can display the calendar correctly based on the value of a variable ($group), but what I can't figure out is how to make $group variable persistent. I don't want users to be able to access other calendars unless permitted by the script. That means that I can't use the xxxx.php?group=3 type of mechanism.
I am setting $group in a user specific page in which session_start() is called and then calling the original code. The trouble is that session_destroy() is called a few times, so I lose my value.
Would this be an appropriate case for a cookie and if so is that secure? What other mechanisms whould you suggest?
Thanks for any help.
I am modifying a calendar script which has multiple adminstrators who can edit their own entries. I would like to give an associated group of users access so that they only see the entries of one of the admins. (Later on I hope to expand it so that a particular user can view the entries of several admins.) I can display the calendar correctly based on the value of a variable ($group), but what I can't figure out is how to make $group variable persistent. I don't want users to be able to access other calendars unless permitted by the script. That means that I can't use the xxxx.php?group=3 type of mechanism.
I am setting $group in a user specific page in which session_start() is called and then calling the original code. The trouble is that session_destroy() is called a few times, so I lose my value.
Would this be an appropriate case for a cookie and if so is that secure? What other mechanisms whould you suggest?
Thanks for any help.