Computing.Net > Forums > Web Development > PHP Login Script

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

PHP Login Script

Reply to Message Icon

Name: Wifler
Date: May 22, 2006 at 11:57:38 Pacific
OS: Win XP
CPU/Ram: P4 2.8/256mb
Comment:

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?



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: May 22, 2006 at 15:13:31 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

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


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: PHP Login Script

Making a login script for my website help! www.computing.net/answers/webdevel/making-a-login-script-for-my-website-help/4185.html

Login script and Shoutbox www.computing.net/answers/webdevel/login-script-and-shoutbox/1884.html

php upload script?? www.computing.net/answers/webdevel/php-upload-script/2083.html