Logging in and sessions???
Posted: Tue Jun 14, 2005 10:34 am
Im creating a secure section on a site where users can edit the content of the website.
As well as this I want to separate the users into admin and regular users, where the admin can add/remove users and both types of user can edit the content and reset their password.
Firstly, in order to separate the users (admin and regular) is it just a case of placing a flag in a db that identifies that user as either admin or a regular user and then adjusting the content they have access to accordingly (i was thinking of an if statement that echos different content depending on the flag)
Secondly how do i ensure that the pages after login remain relevant / linked to the user that has logged in - do i use sessions for this so for example when a user has logged in and changed some content how can i identify that user in order to log who they are and what they have changed
will using sessions stop pages being linked to (ie looking over someones shoulder and copying the url) will it also stop a page being accessed if it has been bookmarked?
thanks in advance for ur help
As well as this I want to separate the users into admin and regular users, where the admin can add/remove users and both types of user can edit the content and reset their password.
Firstly, in order to separate the users (admin and regular) is it just a case of placing a flag in a db that identifies that user as either admin or a regular user and then adjusting the content they have access to accordingly (i was thinking of an if statement that echos different content depending on the flag)
Secondly how do i ensure that the pages after login remain relevant / linked to the user that has logged in - do i use sessions for this so for example when a user has logged in and changed some content how can i identify that user in order to log who they are and what they have changed
will using sessions stop pages being linked to (ie looking over someones shoulder and copying the url) will it also stop a page being accessed if it has been bookmarked?
thanks in advance for ur help