Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One login for different programs

Status
Not open for further replies.

Cosmiccradle

Technical User
Mar 24, 2003
63
NL
Been through the threads here, but can't really find what I'm looking for, that could be my mistake in using the wrong words for searching.

What I'm looking for is the following, a central login in that is attatched to the different areas of the site so that people can use the forum and guestbook and later other things by logging in only once at the home page by becoming a member, and not having to login seperately for each individual process. I do know there is software that exsists that does this, would anyone know of a script or freeware that has this ability? Thanks in advance.
 
it is not really an "ability". most log in systems that are available on the net use a combination of cookies, databases and sessions.

rather than getting a login script that does everything you need to turn the issue around and make sure that your other applications are scripted to use the login systems methods for determining whether a user has access to a particular page or script.
 
So if I understand it correctly, I don't make a single login pointing to the other programs, what i do is point the other programs to the login?
 
perfect.
typically i use sessions to store a flag that shows the user is logged in.
for every page that i want to protect i do something similar to
Code:
session_name("my_application");
session_start();
if (!isset($_SESSION['loggedin'])) {
 //tried to access a resource without being logged in
 header ("Location: [URL unfurl="true"]http://www.mysite.com");[/URL]
 exit;
}

i've posted a login application on this site before that you're welcome to use. if you want it and can't easily find it i'm sure i can dig it out of my archives somewhere. from memory it uses a database for user details but it does not need to if you do not have access to a database.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top