Basic Authentication/log on for a site

Associate
Joined
1 Oct 2004
Posts
793
Location
Windsor
I've been asked to modify a football clubs Trust website to allow its members to log in and see content that the Trust would only like its members to see.

Whats the best way of adding in some form of basic authentication/log in for its members, ideally through the use of their membership number or email address and a password?

This is something I've not done before so any guides on the matter and how to implement it would be great.

Cheers guys.
 
To start off you would need a database which would contain all the details of the people you want to have access. (E.g their usernames and their passwords).

You then need to use a server side scripting language (like php) to take the user/pass entered by user and compare it to the database. If it matches, then you could have start a simple session. Once the simple session is active, this would allow the user to view the protected data. Once they logout or close the browser the session is erased and they can no longer view the site without logging back in again.

Hope this helps.

JB

EDIT: This might help, trying to hunt out some "proper" tutorials aswell to explain it in more details!

http://www.osix.net/modules/article/?id=221

EDIT 2: Try this : http://www.goodphptutorials.com/track/254
 
Last edited:
yes htaccess is by far the simplest way, on apache at least, I would assume you could set up the same kind of thing easily on IIS too,
 
Back
Top Bottom