Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I know there are lots of PHP scripts out there to use for login aspects of websites for registered users. I want to use one of these for our site with a MYSQL database. Is it possible in one of these scripts to allow different registered users access to different sections (pages) of the website?

Of course, but it is up to you to code it. Or, youcould try to find a CMS (Content Management System) with the functionality you want.
In fact, depending on your usage, I would not use the login script itself to determine access. For example, you could create a list of different access types: s=sales, u=user, a=admin, etc. Then have your login script set a session variable with the users access type. Then have each page call a function to check the users access type with the pages access list.
So, a page which can be accesses by admin only would run the function "checkAccess('a')" which would see if the user's access code was in the value passed tot he function. Similarly, a page which can be access by sales and admin would run the function like this: "checkAccess('as')".
These are very simplified examples. It's up to you to determine the best way to implement.
Michael J

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |